:root {
  --brand-black: #111114;
  --brand-blue: #90a0cb;
  --brand-blue-strong: #7f91c4;
  --paper: #f7f8fb;
  --card: #ffffff;
  --ink: #111114;
  --muted: #667085;
  --line: #dce2ee;
  --success: #dff3e4;
  --warning: #fff3cd;
  --danger: #fde2e2;
  --shadow: 0 16px 40px rgba(17, 17, 20, 0.08);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: "Neulis Sans", Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

button,
input,
select {
  font: inherit;
}

.app-shell {
  width: min(1220px, calc(100% - 28px));
  margin: 0 auto;
  padding: 18px 0 48px;
}

.hero {
  min-height: 330px;
  background:
    linear-gradient(135deg, rgba(144, 160, 203, 0.22), rgba(144, 160, 203, 0) 42%),
    var(--brand-black);
  border-radius: 8px;
  color: #ffffff;
  overflow: hidden;
}

.brand-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 22px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.brand-logo {
  display: block;
  width: min(260px, 72vw);
  height: auto;
}

.brand-actions {
  display: flex;
  gap: 8px;
}

.icon-button {
  width: 42px;
  height: 42px;
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.08);
  color: #ffffff;
  cursor: pointer;
  font-size: 22px;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 24px;
  align-items: end;
  padding: 44px 26px 28px;
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--brand-blue);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin: 0;
}

h1 {
  max-width: 780px;
  font-size: clamp(34px, 6vw, 66px);
  line-height: 0.96;
  letter-spacing: 0;
}

.hero-text {
  max-width: 560px;
  margin-top: 16px;
  color: rgba(255, 255, 255, 0.72);
  font-size: 17px;
}

.hero-card {
  display: grid;
  gap: 12px;
  padding: 16px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.07);
}

.hero-card span {
  display: block;
  color: rgba(255, 255, 255, 0.58);
  font-size: 12px;
  text-transform: uppercase;
}

.hero-card strong {
  display: block;
  margin-top: 4px;
  font-size: 16px;
}

.control-strip {
  position: sticky;
  top: 0;
  z-index: 5;
  display: grid;
  grid-template-columns: 1fr auto 220px;
  gap: 12px;
  align-items: end;
  margin: 14px 0;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(247, 248, 251, 0.92);
  backdrop-filter: blur(14px);
}

.search-box,
.filter-box {
  position: relative;
  display: grid;
  gap: 6px;
}

label {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

input,
select {
  width: 100%;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 12px;
  background: #ffffff;
  color: var(--ink);
  outline: none;
}

input:focus,
select:focus {
  border-color: var(--brand-blue);
  box-shadow: 0 0 0 3px rgba(144, 160, 203, 0.28);
}

.search-results {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  display: none;
  max-height: 260px;
  overflow-y: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  box-shadow: var(--shadow);
}

.search-results.open {
  display: block;
}

.search-result {
  width: 100%;
  border: 0;
  border-bottom: 1px solid var(--line);
  background: transparent;
  padding: 10px 12px;
  text-align: left;
  cursor: pointer;
}

.search-result:hover {
  background: rgba(144, 160, 203, 0.14);
}

.segmented {
  display: inline-grid;
  grid-template-columns: 1fr 1fr;
  height: 42px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
}

.segment {
  min-width: 92px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-weight: 800;
}

.segment.active {
  background: var(--brand-black);
  color: #ffffff;
}

.kpis {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}

.kpis article,
.panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--card);
  box-shadow: var(--shadow);
}

.kpis article {
  padding: 16px;
}

.kpis span,
.awards span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.kpis strong {
  display: block;
  margin-top: 8px;
  font-size: 30px;
  line-height: 1;
}

.kpis small {
  display: block;
  margin-top: 8px;
  color: var(--muted);
}

.layout {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(330px, 0.85fr);
  gap: 14px;
  margin-top: 14px;
}

.bottom-layout {
  grid-template-columns: minmax(0, 1.1fr) minmax(360px, 0.9fr);
}

.panel {
  overflow: hidden;
}

.panel-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: start;
  padding: 16px;
  border-bottom: 1px solid var(--line);
}

.panel-head.compact {
  align-items: center;
}

.panel-head h2 {
  font-size: 19px;
}

.panel-head p {
  margin-top: 4px;
  color: var(--muted);
  font-size: 13px;
}

.pill,
.badge {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 4px 9px;
  border-radius: 999px;
  background: rgba(144, 160, 203, 0.18);
  color: var(--brand-black);
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

.leaderboard-list {
  display: grid;
}

.rank-row {
  display: grid;
  grid-template-columns: 44px minmax(150px, 1fr) 120px 90px 120px;
  gap: 12px;
  align-items: center;
  padding: 13px 16px;
  border-bottom: 1px solid var(--line);
  cursor: pointer;
}

.rank-row:hover,
.rank-row.active {
  background: rgba(144, 160, 203, 0.14);
}

.rank {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: var(--brand-black);
  color: #ffffff;
  font-weight: 900;
}

.person strong {
  display: block;
}

.person span,
.metric-label {
  color: var(--muted);
  font-size: 12px;
}

.score-bar {
  height: 8px;
  border-radius: 999px;
  background: #e8ecf5;
  overflow: hidden;
}

.score-bar span {
  display: block;
  height: 100%;
  background: var(--brand-blue);
}

.side-stack {
  display: grid;
  gap: 14px;
}

.benchmark-list {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  padding: 16px;
}

.benchmark-list div,
.awards div {
  min-height: 82px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: #fbfcfe;
}

.benchmark-list strong {
  display: block;
  font-size: 26px;
}

.benchmark-list span {
  color: var(--muted);
  font-size: 12px;
}

.awards {
  display: grid;
  gap: 10px;
  padding: 16px;
}

.awards strong {
  display: block;
  margin-top: 7px;
  font-size: 20px;
}

.profile-card {
  padding: 16px;
}

.profile-header {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: start;
  margin-bottom: 14px;
}

.profile-header h3 {
  font-size: 24px;
}

.profile-metrics {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  margin-bottom: 14px;
}

.profile-metrics div {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px;
}

.profile-metrics span {
  display: block;
  color: var(--muted);
  font-size: 12px;
}

.profile-metrics strong {
  display: block;
  margin-top: 5px;
  font-size: 22px;
}

.feedback-text {
  padding: 14px;
  border-left: 4px solid var(--brand-blue);
  background: rgba(144, 160, 203, 0.1);
  line-height: 1.55;
  white-space: pre-wrap;
}

.alerts-list {
  display: grid;
  padding: 8px 16px 16px;
}

.alert-item {
  display: grid;
  gap: 4px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}

.alert-item:last-child {
  border-bottom: 0;
}

.alert-item strong {
  font-size: 15px;
}

.alert-item span {
  color: var(--muted);
  font-size: 13px;
}

.data-panel {
  margin-top: 14px;
}

.table-wrap {
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

th,
td {
  padding: 11px 14px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  white-space: nowrap;
}

th {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.status-ok {
  background: var(--success);
}

.status-warn {
  background: var(--warning);
}

.status-bad {
  background: var(--danger);
}

.empty-state {
  padding: 18px 16px;
  color: var(--muted);
}

@media (max-width: 980px) {
  .hero-grid,
  .control-strip,
  .kpis,
  .layout,
  .bottom-layout,
  .profile-metrics {
    grid-template-columns: 1fr;
  }

  .rank-row {
    grid-template-columns: 36px 1fr;
  }

  .rank-row .hide-mobile {
    display: none;
  }
}

@media (max-width: 640px) {
  .app-shell {
    width: min(100% - 18px, 1220px);
  }

  .hero-grid {
    padding: 32px 18px 20px;
  }

  .brand-bar {
    padding: 14px 16px;
  }

  .brand-logo {
    width: min(220px, 68vw);
  }
}
