:root {
  --bg: #070c12;
  --bg-soft: #0b121b;
  --panel: #0f1823;
  --panel-2: #121e2b;
  --panel-3: #162333;
  --line: rgba(151, 183, 216, 0.13);
  --line-strong: rgba(151, 183, 216, 0.24);
  --text: #e9f1fb;
  --text-soft: #c3d1e2;
  --muted: #8297ae;
  --accent: #37e0b0;
  --accent-strong: #1fc79a;
  --accent-soft: rgba(55, 224, 176, 0.11);
  --blue: #4a9eff;
  --blue-soft: rgba(74, 158, 255, 0.12);
  --warning: #ffc45c;
  --warning-soft: rgba(255, 196, 92, 0.12);
  --danger: #ff7070;
  --danger-soft: rgba(255, 112, 112, 0.12);
  --radius: 18px;
  --radius-sm: 12px;
  --shadow: 0 20px 50px rgba(0, 0, 0, 0.28);
  --font: "Inter", "SF Pro Display", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
  --mono: "JetBrains Mono", "SFMono-Regular", Consolas, monospace;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(1000px 700px at 85% -10%, rgba(55, 224, 176, 0.07), transparent 60%),
    radial-gradient(900px 600px at 0% 0%, rgba(74, 158, 255, 0.07), transparent 55%),
    linear-gradient(180deg, #070c12 0%, #080e16 50%, #070b11 100%);
  color: var(--text);
  font-family: var(--font);
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(130, 164, 199, 0.028) 1px, transparent 1px),
    linear-gradient(90deg, rgba(130, 164, 199, 0.028) 1px, transparent 1px);
  background-size: 72px 72px;
  mask-image: linear-gradient(180deg, rgba(0,0,0,0.8), transparent 80%);
  z-index: 0;
}
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font-family: inherit; font-size: inherit; }
button { cursor: pointer; }
h1, h2, h3, h4, p { margin: 0; }
h1 { font-size: 24px; line-height: 1.2; letter-spacing: -0.03em; font-weight: 650; }
h2 { font-size: 30px; line-height: 1.2; letter-spacing: -0.035em; font-weight: 650; }
h3 { font-size: 17px; line-height: 1.3; letter-spacing: -0.02em; font-weight: 620; }
h4 { font-size: 16px; font-weight: 620; }
code, pre, .mono { font-family: var(--mono); }
code { background: rgba(120, 155, 190, 0.12); border: 1px solid var(--line); border-radius: 6px; padding: 1px 5px; font-size: 0.9em; color: var(--text-soft); }
::selection { background: rgba(55, 224, 176, 0.3); color: #fff; }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: #233244; border-radius: 10px; border: 2px solid var(--bg); }
::-webkit-scrollbar-track { background: transparent; }

/* ---------- shell ---------- */
.app-shell { position: relative; z-index: 1; min-height: 100vh; }
.sidebar {
  position: fixed;
  z-index: 40;
  inset: 0 auto 0 0;
  width: 258px;
  display: flex;
  flex-direction: column;
  padding: 24px 16px 18px;
  background: linear-gradient(180deg, rgba(10, 17, 25, 0.98), rgba(8, 14, 21, 0.98));
  border-right: 1px solid var(--line);
  backdrop-filter: blur(16px);
}
.brand { display: flex; align-items: center; gap: 12px; padding: 2px 10px 22px; }
.brand__mark {
  width: 42px; height: 42px; flex: 0 0 42px;
  display: grid; place-items: center;
  border-radius: 13px;
  color: var(--accent);
  background: linear-gradient(145deg, rgba(55,224,176,0.18), rgba(55,224,176,0.04));
  border: 1px solid rgba(55,224,176,0.26);
  box-shadow: 0 0 28px rgba(55,224,176,0.12);
}
.brand__mark .icon { width: 23px; height: 23px; }
.brand__mark--lg { width: 52px; height: 52px; flex-basis: 52px; border-radius: 16px; }
.brand__text { display: flex; flex-direction: column; min-width: 0; }
.brand__text strong { font-size: 14px; letter-spacing: -0.01em; }
.brand__text small { color: var(--muted); font-size: 10px; text-transform: uppercase; letter-spacing: 0.13em; margin-top: 2px; }
.nav { display: flex; flex-direction: column; gap: 3px; }
.nav__label { color: #5f748a; font-size: 10px; text-transform: uppercase; letter-spacing: 0.14em; padding: 18px 12px 7px; font-weight: 600; }
.nav__item {
  position: relative;
  display: flex; align-items: center; gap: 11px;
  padding: 10px 12px;
  color: #9db0c5;
  border-radius: 10px;
  font-weight: 500;
  transition: background 0.18s ease, color 0.18s ease, transform 0.18s ease;
}
.nav__item .icon { width: 18px; height: 18px; opacity: 0.85; }
.nav__item:hover { color: var(--text); background: rgba(151,183,216,0.06); }
.nav__item.is-active { color: var(--text); background: linear-gradient(90deg, rgba(55,224,176,0.12), rgba(55,224,176,0.035)); }
.nav__item.is-active::before { content: ""; position: absolute; left: -16px; top: 9px; bottom: 9px; width: 3px; border-radius: 0 4px 4px 0; background: var(--accent); box-shadow: 0 0 16px rgba(55,224,176,0.5); }
.nav__item.is-active .icon { color: var(--accent); opacity: 1; }
.sidebar__bottom { margin-top: auto; display: flex; flex-direction: column; gap: 14px; }
.sidebar__hint { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 11px; padding: 12px 12px 0; border-top: 1px solid var(--line); }
.pulse-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 0 rgba(55,224,176,0.6); animation: pulse 2s infinite; flex: 0 0 7px; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(55,224,176,0.45); } 70% { box-shadow: 0 0 0 7px rgba(55,224,176,0); } 100% { box-shadow: 0 0 0 0 rgba(55,224,176,0); } }
.user-chip { display: flex; align-items: center; gap: 10px; padding: 10px; border: 1px solid var(--line); border-radius: 13px; background: rgba(255,255,255,0.024); }
.avatar { width: 34px; height: 34px; flex: 0 0 34px; border-radius: 10px; display: grid; place-items: center; font-weight: 700; font-size: 13px; color: #07110d; background: linear-gradient(135deg, var(--accent), #6ff0ce); }
.user-chip__meta { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.user-chip__meta strong { font-size: 12px; overflow: hidden; text-overflow: ellipsis; }
.user-chip__meta small { color: var(--muted); font-size: 10px; }
.user-chip__logout { margin-left: auto; }

.main { margin-left: 258px; min-height: 100vh; display: flex; flex-direction: column; }
.topbar {
  position: sticky; top: 0; z-index: 30;
  display: flex; align-items: center; gap: 18px;
  padding: 18px 32px;
  background: rgba(7, 12, 18, 0.78);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(18px);
}
.topbar__menu { display: none !important; }
.topbar__titles { min-width: 0; }
.eyebrow { color: var(--muted); font-size: 10px; text-transform: uppercase; letter-spacing: 0.15em; font-weight: 650; margin-bottom: 4px; }
.topbar__actions { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.live-pill { display: inline-flex; align-items: center; gap: 8px; padding: 7px 11px; border: 1px solid rgba(55,224,176,0.2); background: rgba(55,224,176,0.06); color: #9ff5dc; border-radius: 999px; font-size: 11px; font-weight: 600; }
.live-pill__dot { width: 6px; height: 6px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 10px var(--accent); }
.content { width: 100%; max-width: 1560px; margin: 0 auto; padding: 26px 32px 60px; }
.crumb { color: var(--muted); }
.crumb:hover { color: var(--text); }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 38px; padding: 8px 14px;
  border: 1px solid transparent; border-radius: 10px;
  font-weight: 600; font-size: 12.5px; white-space: nowrap;
  transition: transform 0.16s ease, background 0.16s ease, border-color 0.16s ease, box-shadow 0.16s ease;
}
.btn .icon { width: 16px; height: 16px; }
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn:disabled { opacity: 0.45; cursor: not-allowed; transform: none; }
.btn--primary { color: #04130e; background: linear-gradient(135deg, #4ff0c2, #22c99c); box-shadow: 0 8px 22px rgba(34,201,156,0.18); }
.btn--primary:hover { box-shadow: 0 10px 28px rgba(34,201,156,0.28); }
.btn--ghost { color: var(--text-soft); background: rgba(151,183,216,0.055); border-color: var(--line); }
.btn--ghost:hover { background: rgba(151,183,216,0.1); border-color: var(--line-strong); color: var(--text); }
.btn--danger { color: var(--danger); background: var(--danger-soft); border-color: rgba(255,112,112,0.22); }
.btn--danger:hover { background: rgba(255,112,112,0.18); }
.btn--sm { min-height: 32px; padding: 6px 10px; font-size: 11.5px; border-radius: 9px; }
.btn--lg { min-height: 46px; padding: 12px 20px; font-size: 13.5px; border-radius: 12px; }
.btn--block { width: 100%; }
.icon-btn { display: inline-grid; place-items: center; width: 32px; height: 32px; border: 1px solid transparent; border-radius: 9px; background: transparent; color: var(--muted); transition: 0.16s ease; }
.icon-btn:hover { color: var(--text); background: rgba(151,183,216,0.08); }
.icon-btn .icon { width: 16px; height: 16px; }
.icon-btn--danger:hover { color: var(--danger); background: var(--danger-soft); }
.btn.is-active { color: var(--accent); border-color: rgba(55,224,176,0.3); background: var(--accent-soft); }

/* ---------- panels / layout ---------- */
.panel { background: linear-gradient(180deg, rgba(18,30,43,0.92), rgba(13,22,32,0.92)); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: 0 1px 0 rgba(255,255,255,0.02) inset; overflow: hidden; }
.panel--compact { padding: 18px; }
.panel--compact .panel__head { padding: 0 0 12px; }
.panel--intro { padding: 20px 22px; margin-bottom: 18px; background: linear-gradient(100deg, rgba(55,224,176,0.07), rgba(74,158,255,0.04), transparent 60%), var(--panel); }
.panel__head { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 20px 22px 14px; }
.panel__head .eyebrow { margin-bottom: 3px; }
.grid { display: grid; gap: 18px; }
.grid--main { grid-template-columns: minmax(0, 1.75fr) minmax(300px, 0.8fr); align-items: start; }
.grid--two { grid-template-columns: repeat(2, minmax(0, 1fr)); margin-top: 18px; align-items: start; }
.stack { display: flex; flex-direction: column; gap: 18px; min-width: 0; }
.stack-sm { display: flex; flex-direction: column; gap: 12px; }
.intro-row { display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.intro-row p { max-width: 780px; margin-top: 5px; }
.muted { color: var(--muted); }
.small { font-size: 12px; }
.text-ok { color: var(--accent); }
.ta-r { text-align: right; }
.price { font-weight: 650; white-space: nowrap; font-variant-numeric: tabular-nums; }
.mono { font-family: var(--mono); font-size: 12px; }
.badge { display: inline-flex; align-items: center; gap: 5px; padding: 3px 8px; border-radius: 6px; font-size: 10px; font-weight: 650; letter-spacing: 0.02em; border: 1px solid transparent; }
.badge--ok { color: #7bf0d2; background: var(--accent-soft); border-color: rgba(55,224,176,0.18); }
.badge--warn { color: var(--warning); background: var(--warning-soft); border-color: rgba(255,196,92,0.18); }
.badge--err { color: var(--danger); background: var(--danger-soft); border-color: rgba(255,112,112,0.18); }
.badge--muted { color: var(--muted); background: rgba(130,151,174,0.07); border-color: var(--line); }
.badge--warning { color: var(--warning); background: var(--warning-soft); }
.tag { display: inline-flex; align-items: center; gap: 5px; padding: 3px 8px; border-radius: 6px; border: 1px solid var(--line); background: rgba(151,183,216,0.055); color: #a9bdd2; font-size: 10.5px; white-space: nowrap; }
.tag .icon { width: 12px; height: 12px; }
.tag--accent { color: #8ff1d9; border-color: rgba(55,224,176,0.18); background: var(--accent-soft); }
.tag--xs { padding: 2px 6px; font-size: 9.5px; }

/* ---------- hero ---------- */
.hero {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(280px, 0.65fr);
  min-height: 250px;
  margin-bottom: 18px;
  border: 1px solid rgba(55,224,176,0.14);
  border-radius: 22px;
  overflow: hidden;
  background:
    radial-gradient(600px 300px at 75% 20%, rgba(55,224,176,0.14), transparent 65%),
    radial-gradient(500px 280px at 95% 90%, rgba(74,158,255,0.12), transparent 65%),
    linear-gradient(120deg, #10202a, #0c1721 60%, #0a121b);
}
.hero::after { content: ""; position: absolute; inset: 0; pointer-events: none; background-image: linear-gradient(rgba(55,224,176,0.035) 1px, transparent 1px), linear-gradient(90deg, rgba(55,224,176,0.035) 1px, transparent 1px); background-size: 44px 44px; mask-image: linear-gradient(90deg, rgba(0,0,0,0.7), transparent 70%); }
.hero__content { position: relative; z-index: 2; padding: 32px 34px; align-self: center; }
.hero__content h2 { margin: 8px 0 10px; }
.hero__content p { color: #9db4c9; max-width: 610px; }
.hero__meta { display: flex; flex-wrap: wrap; gap: 16px; margin-top: 20px; color: #9fb5ca; font-size: 11.5px; }
.hero__meta span { display: inline-flex; align-items: center; gap: 6px; }
.hero__meta .icon { width: 14px; height: 14px; color: var(--accent); }
.hero__visual { position: relative; min-height: 250px; }
.hero__chip { position: absolute; z-index: 3; display: inline-flex; align-items: center; gap: 7px; padding: 7px 10px; border: 1px solid var(--line-strong); background: rgba(7,14,21,0.72); border-radius: 9px; font-size: 11px; color: var(--text-soft); box-shadow: var(--shadow); backdrop-filter: blur(8px); }
.hero__chip .icon { width: 13px; height: 13px; color: var(--warning); }
.hero__chip--1 { top: 34px; left: 6%; animation: float 5s ease-in-out infinite; }
.hero__chip--2 { bottom: 38px; right: 8%; animation: float 5s ease-in-out infinite 1.6s; }
@keyframes float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-6px); } }
.hero-radar { position: absolute; width: 220px; height: 220px; right: 50%; top: 50%; transform: translate(50%, -50%); border-radius: 50%; border: 1px solid rgba(55,224,176,0.22); background: radial-gradient(circle, rgba(55,224,176,0.08), transparent 68%); }
.hero-radar__ring { position: absolute; border: 1px solid rgba(55,224,176,0.18); border-radius: 50%; inset: 18%; }
.hero-radar__ring--2 { inset: 34%; }
.hero-radar__ring--3 { inset: 46%; }
.hero-radar__sweep { position: absolute; inset: 0; border-radius: 50%; background: conic-gradient(from 0deg, transparent 0deg, rgba(55,224,176,0.28) 40deg, transparent 90deg); animation: sweep 5s linear infinite; mask-image: radial-gradient(circle, transparent 8%, #000 9%); }
@keyframes sweep { to { transform: rotate(360deg); } }
.hero-radar__center { position: absolute; inset: 42%; display: grid; place-items: center; color: var(--accent); }
.hero-radar__center .icon { width: 34px; height: 34px; }
.hero-radar__blip { position: absolute; width: 7px; height: 7px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 12px var(--accent); animation: blip 3s ease-in-out infinite; }
.hero-radar__blip--1 { top: 24%; left: 62%; }
.hero-radar__blip--2 { top: 64%; left: 22%; animation-delay: 0.8s; }
.hero-radar__blip--3 { top: 72%; left: 70%; animation-delay: 1.7s; }
@keyframes blip { 0%, 100% { opacity: 0.35; transform: scale(0.8); } 50% { opacity: 1; transform: scale(1.15); } }

/* ---------- stats ---------- */
.stat-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin-bottom: 18px; }
.stat-card { position: relative; padding: 16px 18px 14px; border: 1px solid var(--line); border-radius: var(--radius); background: linear-gradient(160deg, rgba(19,32,46,0.95), rgba(12,21,31,0.95)); overflow: hidden; }
.stat-card::after { content: ""; position: absolute; right: -30px; top: -30px; width: 110px; height: 110px; border-radius: 50%; background: radial-gradient(circle, rgba(74,158,255,0.08), transparent 70%); }
.stat-card--accent { border-color: rgba(55,224,176,0.2); }
.stat-card--accent::after { background: radial-gradient(circle, rgba(55,224,176,0.15), transparent 70%); }
.stat-card--warning { border-color: rgba(255,196,92,0.18); }
.stat-card--warning::after { background: radial-gradient(circle, rgba(255,196,92,0.12), transparent 70%); }
.stat-card--danger { border-color: rgba(255,112,112,0.24); }
.stat-card__top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.stat-card__icon { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 9px; color: var(--accent); background: var(--accent-soft); }
.stat-card__icon .icon { width: 15px; height: 15px; }
.stat-card__hint { color: var(--muted); font-size: 10px; text-transform: uppercase; letter-spacing: 0.08em; }
.stat-card__value { font-size: 30px; font-weight: 680; letter-spacing: -0.045em; margin-top: 10px; font-variant-numeric: tabular-nums; }
.stat-card__label { color: var(--muted); font-size: 11.5px; }

/* ---------- tables ---------- */
.table-wrap { overflow-x: auto; }
.tenders-table { width: 100%; border-collapse: collapse; }
.tenders-table th { padding: 10px 18px; text-align: left; color: #6f8499; font-size: 10px; font-weight: 650; text-transform: uppercase; letter-spacing: 0.1em; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); background: rgba(255,255,255,0.015); white-space: nowrap; }
.tenders-table td { padding: 13px 18px; border-bottom: 1px solid rgba(151,183,216,0.07); vertical-align: middle; }
.tenders-table tbody tr { transition: background 0.14s ease; }
.tenders-table tbody tr:hover { background: rgba(55,224,176,0.035); }
.tenders-table tbody tr:last-child td { border-bottom: 0; }
.row-link { cursor: pointer; }
.tender-title { font-weight: 560; color: var(--text); max-width: 620px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; line-height: 1.4; }
.tender-sub { display: flex; align-items: center; flex-wrap: wrap; gap: 5px; margin-top: 5px; color: var(--muted); font-size: 11px; }
.tender-customer { color: var(--text-soft); max-width: 230px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.source-badge { display: inline-flex; align-items: center; gap: 5px; padding: 4px 8px; border-radius: 7px; border: 1px solid var(--line); background: rgba(151,183,216,0.05); color: #b4c8da; font-size: 10.5px; white-space: nowrap; }
.deadline { display: flex; flex-direction: column; gap: 1px; white-space: nowrap; }
.deadline strong { font-weight: 600; font-size: 12px; color: var(--text-soft); }
.deadline small { font-size: 10px; color: var(--muted); }
.deadline--ok small { color: #7bd9c2; }
.deadline--warning small { color: var(--warning); }
.deadline--danger small { color: var(--danger); }
.deadline--expired small { color: #65798e; }

/* ---------- dashboard blocks ---------- */
.deadline-list { display: flex; flex-direction: column; }
.deadline-item { display: flex; align-items: center; gap: 11px; padding: 10px 0; border-top: 1px solid rgba(151,183,216,0.07); }
.deadline-item:first-child { border-top: 0; }
.deadline-item:hover .deadline-item__body strong { color: var(--accent); }
.deadline-item__date { width: 42px; flex: 0 0 42px; height: 42px; border-radius: 10px; display: flex; flex-direction: column; align-items: center; justify-content: center; background: rgba(255,196,92,0.08); border: 1px solid rgba(255,196,92,0.16); color: var(--warning); }
.deadline-item__date strong { font-size: 16px; line-height: 1; }
.deadline-item__date small { font-size: 8px; text-transform: uppercase; letter-spacing: 0.06em; }
.deadline-item__body { min-width: 0; flex: 1; display: flex; flex-direction: column; }
.deadline-item__body strong { font-size: 11.5px; line-height: 1.35; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; transition: color 0.15s ease; }
.deadline-item__body small { color: var(--muted); font-size: 10px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.deadline-item > .icon { width: 14px; height: 14px; color: #4e6377; flex: 0 0 14px; }
.source-list { display: flex; flex-direction: column; }
.source-mini { display: flex; align-items: center; gap: 10px; padding: 9px 0; border-top: 1px solid rgba(151,183,216,0.07); }
.source-mini:first-child { border-top: 0; }
.source-mini__icon { width: 30px; height: 30px; display: grid; place-items: center; border-radius: 8px; background: rgba(74,158,255,0.08); color: var(--blue); flex: 0 0 30px; }
.source-mini__icon .icon { width: 14px; height: 14px; }
.source-mini__body { display: flex; flex-direction: column; gap: 2px; min-width: 0; flex: 1; }
.source-mini__body strong { font-size: 11.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.source-mini__count { font-size: 14px; font-weight: 650; color: var(--text-soft); font-variant-numeric: tabular-nums; }
.status { display: inline-flex; align-items: center; gap: 5px; font-size: 9.5px; color: var(--muted); }
.status__dot { width: 5px; height: 5px; border-radius: 50%; background: #5f748a; }
.status--ok .status__dot { background: var(--accent); box-shadow: 0 0 7px rgba(55,224,176,0.7); }
.status--warn .status__dot { background: var(--warning); }
.status--run .status__dot { background: var(--blue); animation: pulse 1.2s infinite; }
.status--err { color: var(--danger); }
.status--err .status__dot { background: var(--danger); }
.keyword-cloud { display: flex; flex-wrap: wrap; gap: 8px; padding: 0 22px 20px; }
.keyword-chip { display: inline-flex; align-items: center; gap: 8px; padding: 8px 12px; border-radius: 9px; border: 1px solid var(--line); background: rgba(151,183,216,0.04); color: var(--text-soft); font-size: 12px; transition: 0.16s ease; }
.keyword-chip:hover { border-color: rgba(55,224,176,0.28); background: var(--accent-soft); color: #aff8e6; transform: translateY(-1px); }
.keyword-chip__dot { width: 5px; height: 5px; border-radius: 50%; background: var(--accent); }
.keyword-chip__arrow .icon { width: 13px; height: 13px; color: #5f748a; }
.keyword-chip--static { cursor: default; }
.keyword-chip--static:hover { transform: none; }
.run-list { display: flex; flex-direction: column; padding: 0 22px 18px; }
.run-item { display: flex; align-items: center; gap: 10px; padding: 9px 0; border-top: 1px solid rgba(151,183,216,0.07); }
.run-item:first-child { border-top: 0; }
.run-item__dot { width: 7px; height: 7px; border-radius: 50%; background: #5f748a; flex: 0 0 7px; }
.run-item__dot--ok { background: var(--accent); }
.run-item__dot--partial { background: var(--warning); }
.run-item__dot--error { background: var(--danger); }
.run-item__dot--running { background: var(--blue); animation: pulse 1.2s infinite; }
.run-item__body { min-width: 0; flex: 1; display: flex; flex-direction: column; }
.run-item__body strong { font-size: 11.5px; }
.run-item__body small { color: var(--muted); font-size: 10px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---------- filters ---------- */
.filters-panel { padding: 14px 16px; margin-bottom: 16px; }
.filters { display: grid; grid-template-columns: minmax(220px, 1.5fr) repeat(4, minmax(130px, 0.7fr)) auto; gap: 10px; align-items: end; }
.filter { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.filter__label { color: var(--muted); font-size: 9.5px; text-transform: uppercase; letter-spacing: 0.09em; font-weight: 650; padding-left: 2px; }
.filter__control { display: flex; align-items: center; gap: 8px; height: 38px; padding: 0 10px; border: 1px solid var(--line); border-radius: 9px; background: rgba(7,13,20,0.45); }
.filter__control .icon { width: 15px; height: 15px; color: var(--muted); flex: 0 0 15px; }
.filter__control input { width: 100%; border: 0; outline: 0; background: transparent; color: var(--text); }
.filter select, .input { width: 100%; height: 38px; padding: 0 10px; border: 1px solid var(--line); border-radius: 9px; background: rgba(7,13,20,0.45); color: var(--text); outline: none; transition: border-color 0.15s ease, box-shadow 0.15s ease; }
.filter select:focus, .input:focus, .filter__control:focus-within { border-color: rgba(55,224,176,0.45); box-shadow: 0 0 0 3px rgba(55,224,176,0.08); }
.filters__actions { display: flex; gap: 6px; }
.filters__actions .btn { min-height: 38px; }

/* ---------- pagination ---------- */
.pagination { display: flex; align-items: center; gap: 12px; padding: 16px 20px; border-top: 1px solid var(--line); }
.page-btn, .page-num { display: inline-flex; align-items: center; justify-content: center; min-width: 32px; height: 32px; padding: 0 10px; border: 1px solid var(--line); border-radius: 8px; color: var(--muted); font-size: 11.5px; transition: 0.15s ease; }
.page-btn:hover, .page-num:hover { color: var(--text); border-color: var(--line-strong); background: rgba(151,183,216,0.05); }
.page-btn.is-disabled { opacity: 0.35; pointer-events: none; }
.page-numbers { display: flex; align-items: center; gap: 5px; }
.page-num.is-active { color: #04130e; background: var(--accent); border-color: var(--accent); font-weight: 700; }
.page-gap { color: var(--muted); padding: 0 3px; }
.page-btn .icon { width: 13px; height: 13px; }
.page-numbers .icon { width: 13px; height: 13px; }

/* ---------- empty / flash ---------- */
.empty { display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 46px 22px; gap: 8px; }
.empty__icon { width: 54px; height: 54px; display: grid; place-items: center; border-radius: 16px; color: var(--accent); background: var(--accent-soft); border: 1px solid rgba(55,224,176,0.18); margin-bottom: 4px; }
.empty__icon .icon { width: 26px; height: 26px; }
.empty p { color: var(--muted); max-width: 430px; font-size: 12.5px; }
.empty--sm { padding: 20px 0; }
.empty--sm p { font-size: 12px; }
.flash-stack { display: flex; flex-direction: column; gap: 8px; margin-bottom: 14px; }
.flash { display: flex; align-items: center; gap: 10px; padding: 11px 14px; border-radius: 10px; font-size: 12.5px; border: 1px solid var(--line); background: rgba(151,183,216,0.055); }
.flash--success { border-color: rgba(55,224,176,0.22); background: var(--accent-soft); color: #b8f8e7; }
.flash--warning { border-color: rgba(255,196,92,0.22); background: var(--warning-soft); color: #ffe0a1; }
.flash--error { border-color: rgba(255,112,112,0.24); background: var(--danger-soft); color: #ffc0c0; }
.flash__icon .icon { width: 16px; height: 16px; }
.toast { position: fixed; left: 50%; bottom: 24px; z-index: 100; transform: translate(-50%, 20px); opacity: 0; pointer-events: none; padding: 10px 16px; border-radius: 10px; border: 1px solid var(--line-strong); background: #101d2a; color: var(--text); box-shadow: var(--shadow); font-size: 12px; transition: 0.22s ease; }
.toast.is-visible { opacity: 1; transform: translate(-50%, 0); }

/* ---------- detail ---------- */
.detail-layout { display: grid; grid-template-columns: minmax(0, 1.65fr) minmax(300px, 0.75fr); gap: 18px; align-items: start; }
.detail-main { overflow: visible; }
.detail-head { padding: 24px 26px 16px; border-bottom: 1px solid var(--line); }
.detail-head__badges { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 14px; }
.detail-head h2 { font-size: 25px; max-width: 900px; }
.detail-head__meta { display: flex; flex-wrap: wrap; gap: 16px; margin-top: 12px; color: var(--muted); font-size: 11.5px; }
.detail-head__meta span { display: inline-flex; align-items: center; gap: 6px; }
.detail-head__meta .icon { width: 14px; height: 14px; }
.detail-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0; border-bottom: 1px solid var(--line); }
.detail-stat { padding: 18px 26px; border-left: 1px solid var(--line); display: flex; flex-direction: column; gap: 4px; }
.detail-stat:first-child { border-left: 0; }
.detail-stat__label { color: var(--muted); font-size: 9.5px; text-transform: uppercase; letter-spacing: 0.1em; font-weight: 650; }
.detail-stat__value { font-size: 15px; font-weight: 620; letter-spacing: -0.01em; }
.detail-section { padding: 20px 26px; border-bottom: 1px solid var(--line); }
.detail-section h3 { margin-bottom: 10px; }
.detail-section .keyword-cloud { padding: 0; }
.prose p { color: var(--text-soft); font-size: 13px; line-height: 1.65; margin-bottom: 8px; }
.prose p:last-child { margin-bottom: 0; }
.detail-footer { display: flex; align-items: center; gap: 10px; padding: 18px 26px; }
.detail-aside .panel { padding: 18px; }
.detail-aside h3 { margin: 5px 0 8px; }
.countdown-card { background: linear-gradient(160deg, rgba(255,196,92,0.08), rgba(18,30,43,0.95) 60%); border-color: rgba(255,196,92,0.18); }
.countdown { margin: 8px 0 12px; }
.countdown strong { display: block; font-size: 24px; letter-spacing: -0.03em; color: #ffe0a1; }
.countdown span { color: var(--muted); font-size: 11.5px; }
.progress { height: 5px; border-radius: 10px; background: rgba(255,255,255,0.06); overflow: hidden; margin: 12px 0; }
.progress span { display: block; height: 100%; border-radius: 10px; background: linear-gradient(90deg, var(--warning), #ff9f43); }
.kv { display: flex; flex-direction: column; gap: 8px; margin: 12px 0; }
.kv > div { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; padding-top: 8px; border-top: 1px solid rgba(151,183,216,0.07); }
.kv span { color: var(--muted); font-size: 11px; }
.kv strong { font-size: 11.5px; font-weight: 600; text-align: right; }

/* ---------- sources ---------- */
.source-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.source-card { padding: 18px; overflow: visible; }
.source-card.is-disabled { opacity: 0.62; }
.source-card__head { display: flex; align-items: flex-start; gap: 10px; }
.source-card__mark { width: 38px; height: 38px; flex: 0 0 38px; display: grid; place-items: center; border-radius: 11px; color: var(--accent); background: var(--accent-soft); border: 1px solid rgba(55,224,176,0.18); }
.source-card__mark .icon { width: 18px; height: 18px; }
.source-card__title { min-width: 0; flex: 1; }
.source-card__title h3 { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.source-card__desc { color: var(--muted); font-size: 11.5px; min-height: 34px; margin: 10px 0 12px; }
.source-card__stats { display: grid; grid-template-columns: repeat(3, 1fr); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: 10px 0; }
.source-card__stats > div { display: flex; flex-direction: column; gap: 1px; padding-left: 12px; border-left: 1px solid var(--line); }
.source-card__stats > div:first-child { border-left: 0; padding-left: 0; }
.source-card__stats strong { font-size: 16px; font-weight: 650; font-variant-numeric: tabular-nums; }
.source-card__stats span { color: var(--muted); font-size: 9.5px; }
.source-card__meta { display: flex; flex-wrap: wrap; gap: 10px; margin: 10px 0; color: var(--muted); font-size: 10.5px; align-items: center; }
.source-card__meta span { display: inline-flex; align-items: center; gap: 4px; }
.source-card__meta .icon { width: 12px; height: 12px; }
.source-card__actions { display: flex; flex-wrap: wrap; gap: 6px; }
.source-card__actions form { margin: 0; }
.source-error { margin: 8px 0; border: 1px solid rgba(255,112,112,0.18); border-radius: 8px; background: rgba(255,112,112,0.05); padding: 8px 10px; }
.source-error summary { color: #ffb3b3; font-size: 11px; cursor: pointer; display: flex; align-items: center; gap: 6px; }
.source-error summary .icon { width: 13px; height: 13px; }
.source-error pre, .run-error-row pre { margin: 8px 0 0; white-space: pre-wrap; word-break: break-word; color: #d7a7a7; font-size: 10.5px; max-height: 160px; overflow: auto; }
.steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; padding: 0 22px 22px; }
.step { display: flex; gap: 12px; padding: 14px; border: 1px solid var(--line); border-radius: 12px; background: rgba(255,255,255,0.015); }
.step > span { font-family: var(--mono); font-size: 10px; color: var(--accent); padding-top: 2px; }
.step strong { font-size: 12px; display: block; margin-bottom: 3px; }
.step p { color: var(--muted); font-size: 11px; line-height: 1.5; }

/* ---------- forms ---------- */
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; padding: 0 22px 22px; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field--full { grid-column: 1 / -1; }
.field__label { color: var(--text-soft); font-size: 11px; font-weight: 600; }
.field__hint { color: var(--muted); font-size: 10.5px; }
.field__control { display: flex; align-items: center; gap: 8px; height: 40px; padding: 0 11px; border: 1px solid var(--line); border-radius: 9px; background: rgba(7,13,20,0.45); }
.field__control .icon { width: 15px; height: 15px; color: var(--muted); flex: 0 0 15px; }
.field__control input { width: 100%; border: 0; outline: 0; background: transparent; color: var(--text); }
textarea.input { height: auto; padding: 10px; resize: vertical; line-height: 1.5; }
.input--code { font-family: var(--mono); font-size: 11.5px; background: #080f17; color: #b9e6d8; }
select.input { appearance: none; background-image: linear-gradient(45deg, transparent 50%, #7f93a8 50%), linear-gradient(135deg, #7f93a8 50%, transparent 50%); background-position: calc(100% - 16px) 16px, calc(100% - 11px) 16px; background-size: 5px 5px; background-repeat: no-repeat; padding-right: 30px; }
.check { display: flex; align-items: flex-start; gap: 9px; color: var(--text-soft); font-size: 12px; cursor: pointer; }
.check input { width: 16px; height: 16px; margin-top: 2px; accent-color: var(--accent); }
.form-actions { display: flex; flex-direction: column; gap: 8px; }
.code-block { background: #080f17; border: 1px solid var(--line); border-radius: 9px; padding: 12px; color: #a8d9ca; font-size: 10px; line-height: 1.5; overflow-x: auto; }

/* ---------- keywords ---------- */
.keyword-list { display: flex; flex-direction: column; padding: 0 22px 18px; }
.keyword-row { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-top: 1px solid rgba(151,183,216,0.07); }
.keyword-row:first-child { border-top: 0; }
.keyword-row.is-disabled { opacity: 0.45; }
.keyword-row__index { font-family: var(--mono); color: #4e6377; font-size: 10px; width: 20px; flex: 0 0 20px; }
.keyword-row__body { min-width: 0; flex: 1; display: flex; flex-direction: column; gap: 2px; }
.keyword-row__body strong { font-size: 12.5px; }
.keyword-row__body small { color: var(--muted); font-size: 10.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.keyword-row__count { color: #6f8499; font-size: 9.5px; }
.keyword-row__actions { display: flex; gap: 3px; }
.test-result { margin-top: 12px; display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.test-result__ok { display: inline-flex; align-items: center; gap: 5px; color: var(--accent); font-size: 11.5px; width: 100%; }
.test-result__ok .icon { width: 14px; height: 14px; }
.test-result__empty { display: inline-flex; align-items: center; gap: 5px; color: var(--warning); font-size: 11.5px; }
.test-result__empty .icon { width: 14px; height: 14px; }

/* ---------- login ---------- */
.login-body { background: #060a0f; overflow: hidden; }
.login-scene { position: relative; min-height: 100vh; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 30px 20px; isolation: isolate; }
.login-scene::before { content: ""; position: absolute; inset: 0; background: radial-gradient(600px 500px at 50% 40%, rgba(55,224,176,0.11), transparent 65%), radial-gradient(800px 600px at 80% 0%, rgba(74,158,255,0.08), transparent 60%); z-index: -2; }
.radar-bg { position: absolute; width: 760px; height: 760px; left: 50%; top: 50%; transform: translate(-50%, -50%); border-radius: 50%; border: 1px solid rgba(55,224,176,0.08); z-index: -1; pointer-events: none; }
.radar-bg__ring { position: absolute; border-radius: 50%; border: 1px solid rgba(55,224,176,0.07); inset: 12%; }
.radar-bg__ring--2 { inset: 26%; }
.radar-bg__ring--3 { inset: 40%; }
.radar-bg__sweep { position: absolute; inset: 0; border-radius: 50%; background: conic-gradient(from 0deg, transparent 0deg, rgba(55,224,176,0.1) 35deg, transparent 75deg); animation: sweep 9s linear infinite; }
.radar-bg__blip { position: absolute; width: 5px; height: 5px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 12px var(--accent); opacity: 0.7; }
.radar-bg__blip--1 { top: 22%; left: 63%; }
.radar-bg__blip--2 { top: 68%; left: 28%; }
.radar-bg__blip--3 { top: 74%; left: 70%; }
.login-card { position: relative; width: 100%; max-width: 430px; padding: 30px; border: 1px solid rgba(151,183,216,0.16); border-radius: 24px; background: linear-gradient(165deg, rgba(18,30,43,0.94), rgba(8,14,21,0.96)); box-shadow: 0 40px 100px rgba(0,0,0,0.5), 0 0 0 1px rgba(255,255,255,0.02) inset; backdrop-filter: blur(18px); }
.login-card__brand { display: flex; gap: 14px; align-items: flex-start; margin-bottom: 24px; }
.login-card__kicker { color: var(--accent); font-size: 9.5px; text-transform: uppercase; letter-spacing: 0.16em; font-weight: 650; margin-bottom: 4px; }
.login-card h1 { font-size: 25px; letter-spacing: -0.04em; }
.login-card__brand p { color: var(--muted); font-size: 11.5px; margin-top: 5px; }
.login-form { display: flex; flex-direction: column; gap: 14px; }
.login-form .field__control { height: 44px; }
.login-form .btn { margin-top: 4px; }
.login-card__footer { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 10.5px; margin-top: 20px; padding-top: 16px; border-top: 1px solid var(--line); }
.login-error { margin-bottom: 16px; }
.login-meta { display: flex; flex-wrap: wrap; justify-content: center; gap: 18px; margin-top: 22px; color: #5f748a; font-size: 10.5px; }
.login-meta span { display: inline-flex; align-items: center; gap: 5px; }
.login-meta .icon { width: 13px; height: 13px; }

/* ---------- misc ---------- */
.run-error-row td { background: rgba(255,112,112,0.03); padding-top: 0; }
.run-error-row details summary { color: #ffb3b3; font-size: 11px; cursor: pointer; display: inline-flex; align-items: center; gap: 5px; }
.run-error-row details summary .icon { width: 13px; height: 13px; }
.is-running .live-pill { border-color: rgba(74,158,255,0.3); background: var(--blue-soft); color: #b8d8ff; }
.is-running #run-parser .icon { animation: spin 1.2s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- responsive ---------- */
@media (max-width: 1280px) {
  .filters { grid-template-columns: minmax(220px, 1.5fr) repeat(2, minmax(130px, 0.8fr)) minmax(130px, 0.8fr) minmax(130px, 0.8fr); }
  .filters__actions { grid-column: 1 / -1; justify-content: flex-end; }
}
@media (max-width: 1150px) {
  .grid--main { grid-template-columns: 1fr; }
  .grid--main > .stack { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hero { grid-template-columns: 1fr; }
  .hero__visual { display: none; }
  .detail-layout { grid-template-columns: 1fr; }
  .detail-aside { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 960px) {
  .sidebar { transform: translateX(-100%); transition: transform 0.25s ease; box-shadow: 30px 0 80px rgba(0,0,0,0.4); }
  .sidebar.is-open { transform: translateX(0); }
  .main { margin-left: 0; }
  .topbar { padding: 14px 18px; }
  .topbar__menu { display: inline-grid !important; }
  .content { padding: 18px 18px 50px; }
  .stat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .source-grid { grid-template-columns: 1fr; }
  .grid--two { grid-template-columns: 1fr; }
  .steps { grid-template-columns: 1fr; }
  .source-form .detail-layout { grid-template-columns: 1fr; }
  .filters { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .filters__actions { grid-column: 1 / -1; justify-content: flex-start; }
  .detail-stats { grid-template-columns: 1fr; }
  .detail-stat { border-left: 0; border-top: 1px solid var(--line); }
  .detail-stat:first-child { border-top: 0; }
  .detail-aside { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  h1 { font-size: 20px; }
  h2 { font-size: 24px; }
  .topbar__actions .live-pill { display: none; }
  .topbar__actions .btn span { display: none; }
  .topbar__actions .btn { width: 38px; padding: 0; }
  .content { padding: 14px 12px 40px; }
  .stat-grid { gap: 10px; }
  .stat-card { padding: 13px; }
  .stat-card__value { font-size: 24px; }
  .hero__content { padding: 24px 20px; }
  .filters { grid-template-columns: 1fr; }
  .tenders-table th:nth-child(3), .tenders-table td:nth-child(3) { display: none; }
  .tenders-table--wide th:nth-child(2), .tenders-table--wide td:nth-child(2) { display: none; }
  .tenders-table th, .tenders-table td { padding: 11px 12px; }
  .tenders-table--wide .tender-title { font-size: 12px; }
  .tender-title { font-size: 12.5px; }
  .tender-customer { max-width: 140px; }
  .panel__head { padding: 16px 16px 12px; }
  .keyword-cloud, .run-list, .keyword-list { padding-left: 16px; padding-right: 16px; }
  .detail-head, .detail-section, .detail-footer { padding-left: 18px; padding-right: 18px; }
  .form-grid { padding-left: 16px; padding-right: 16px; grid-template-columns: 1fr; }
  .steps { padding-left: 16px; padding-right: 16px; }
  .login-card { padding: 24px 20px; }
  .login-meta { gap: 10px; }
  .pagination { flex-wrap: wrap; justify-content: center; }
}
