:root {
  --bg: #f4f7fb;
  --card: #ffffff;
  --text: #1a2433;
  --muted: #5f6b7a;
  --line: #d8e0eb;
  --brand: #0b63f3;
  --brand-strong: #004bcc;
  --success: #0f9d66;
  --warning: #e28a00;
}

* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: "Segoe UI", Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.4;
}

.container {
  width: min(1180px, 92vw);
  margin: 0 auto;
}

main.container {
  padding-bottom: 24px;
}

.topbar {
  background: #0e1a2e;
  color: #e8edf7;
  padding: 16px 0;
}
.topbar-inner {
  display: flex;
  gap: 16px;
  align-items: center;
  justify-content: space-between;
}
.title h1 { margin: 0; font-size: 24px; }
.title p { margin: 4px 0 0; color: #b8c3d9; font-size: 14px; }

.btn {
  border: none;
  border-radius: 10px;
  padding: 10px 14px;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  white-space: nowrap;
}
.btn-primary { background: var(--brand); color: #fff; }
.btn-primary:hover { background: var(--brand-strong); }
.btn-muted { background: #e7edf7; color: #213148; }

.grid {
  display: grid;
  gap: 16px;
  margin: 18px 0 26px;
}
.grid.cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.grid.cols-2 { grid-template-columns: 2fr 1fr; }

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 16px;
}
.card h2, .card h3 { margin: 0 0 12px; }
.muted { color: var(--muted); }
.sticky-filters {
  position: sticky;
  top: 10px;
  z-index: 10;
  margin-bottom: 20px;
}

label { display: block; font-size: 13px; margin-bottom: 6px; color: var(--muted); }
input, select {
  width: 100%;
  border: 1px solid #c9d3e2;
  border-radius: 10px;
  padding: 10px 12px;
  font-size: 14px;
  background: #fff;
}

.search-actions {
  display: flex;
  gap: 10px;
  align-items: center;
  margin-top: 14px;
  flex-wrap: wrap;
}

.badge {
  display: inline-block;
  border-radius: 999px;
  padding: 4px 10px;
  font-size: 12px;
  font-weight: 600;
}
.badge.success { background: #e9f8f1; color: var(--success); }
.badge.warning { background: #fff3df; color: var(--warning); }
.results-header {
  display: flex;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}
.pager {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}

.table-wrap {
  overflow: auto;
  border-radius: 10px;
  border: 1px solid #e6ecf5;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
  min-width: 860px;
}
th, td {
  text-align: left;
  border-bottom: 1px solid #e6ecf5;
  padding: 10px 8px;
  vertical-align: top;
}
th {
  color: #42506a;
  font-weight: 700;
  background: #f8fbff;
}

.blurred-cell {
  filter: blur(4px);
  user-select: none;
  pointer-events: none;
}

.sidebar-list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.sidebar-list a {
  text-decoration: none;
  color: #1f2c42;
  padding: 10px 12px;
  border-radius: 8px;
  display: block;
}
.sidebar-list a.active,
.sidebar-list a:hover { background: #e8f0ff; color: #0b4bcf; }

.kpis {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
.kpi {
  background: #f7faff;
  border: 1px solid #dce7f8;
  border-radius: 10px;
  padding: 12px;
}
.kpi strong { display: block; font-size: 22px; margin-top: 4px; }

.cabinet-layout {
  grid-template-columns: 1fr 2fr;
}

.auth-card {
  width: min(520px, 100%);
  margin: 20px auto 0;
}

.auth-form {
  display: grid;
  gap: 12px;
}

.checkbox {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.checkbox input {
  width: auto;
}

@media (max-width: 960px) {
  .grid.cols-4, .grid.cols-2, .kpis, .cabinet-layout { grid-template-columns: 1fr; }
  .results-header { flex-direction: column; align-items: flex-start; }
  .sticky-filters { position: static; }
  .topbar-inner { flex-wrap: wrap; }
  .topbar-inner > div:last-child { width: 100%; }
  .topbar-inner > div:last-child .btn { width: 100%; }
  .search-actions .btn { width: 100%; }
}
