/* Оформление по макету: тёмная тема, скруглённые карточки, меню из иконок. */
:root {
  --bg: #0B0B0C;
  --shell: #151517;
  --card: #1B1B1E;
  --card-2: #232327;
  --card-3: #2A2A2E;
  --line: #26262A;
  --ink: #F4F4F5;
  --ink-2: #C9C9CF;
  --mute: #9A9AA3;
  --mute-2: #75757E;
  --accent: #2F55E8;
  --accent-soft: #8EA8FA;
  --good: #86E3A8;
  --good-bg: #16392A;
  --warn: #F6DE7E;
  --bad: #F59A92;
  --bad-bg: #3E1C1C;
  --orange: #F2A27A;
  --violet: #C9A7F5;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--shell);
  color: var(--ink);
  font-family: 'Manrope', system-ui, -apple-system, 'Segoe UI', sans-serif;
  font-size: 14px;
}

a { color: var(--accent-soft); }
a:hover { color: #FFFFFF; }

.shell { min-height: 100vh; padding: 16px; }
.frame {
  min-height: calc(100vh - 32px);
  background: var(--bg);
  border-radius: 28px;
  display: flex;
  flex-wrap: wrap;
  overflow: hidden;
}

/* --- меню из иконок --- */
.side {
  flex: 0 0 76px;
  padding: 20px 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 28px;
  border-right: 1px solid var(--card);
}
.logo {
  width: 40px; height: 40px;
  border-radius: 12px;
  background: var(--accent);
  display: flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: 16px; color: #FFFFFF;
}
.side nav { display: flex; flex-direction: column; gap: 10px; }
.side nav a {
  position: relative;
  display: flex; align-items: center; justify-content: center;
  width: 44px; height: 44px;
  border-radius: 12px;
  color: var(--mute);
  text-decoration: none;
}
.side nav a:hover { background: #1F1F22; color: #FFFFFF; }
.side nav a[aria-current='page'] { background: #FFFFFF; color: var(--bg); }
/* подсказка с названием раздела */
.side nav a::after {
  content: attr(data-title);
  position: absolute; left: 54px;
  padding: 6px 10px;
  background: var(--card-3); color: var(--ink);
  border-radius: 8px;
  font-size: 12px; font-weight: 600; white-space: nowrap;
  opacity: 0; pointer-events: none;
  transition: opacity .12s;
  z-index: 5;
}
.side nav a:hover::after, .side nav a:focus-visible::after { opacity: 1; }
.side .bottom { margin-top: auto; }
.side .bottom a { background: var(--card); }

main { flex: 999 1 560px; min-width: 0; padding: 20px 28px 40px; }
.wrap { max-width: 1240px; margin: 0 auto; display: flex; flex-direction: column; gap: 20px; }
.wrap-wide { max-width: 1320px; }

h1 { margin: 0; font-size: 32px; font-weight: 800; letter-spacing: -0.02em; }
h2 { margin: 0; font-size: 18px; font-weight: 700; }
.sub { margin: 6px 0 0; font-size: 14px; color: var(--mute); }

/* --- карточки --- */
.card {
  background: var(--card);
  border-radius: 20px;
  padding: 20px;
  min-width: 0;
  position: relative;
}
.card-light { background: #F4F4F6; color: var(--bg); }
.card-light .mute { color: #55555E; }
.go {
  position: absolute; top: 14px; right: 14px;
  width: 40px; height: 40px;
  border-radius: 20px;
  display: flex; align-items: center; justify-content: center;
  background: var(--card-3); color: var(--ink);
  text-decoration: none;
}
.go:hover { background: #3A3A3F; color: #FFFFFF; }
.go-accent { background: var(--accent); color: #FFFFFF; }
.go-light { background: #F4F4F6; color: var(--bg); }

.row { display: flex; flex-wrap: wrap; gap: 16px; }
.row-tight { gap: 10px; }
.between { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; }
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.grid-auto { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px; }
.mute { color: var(--mute); }
.small { font-size: 12px; }
.num { font-size: 34px; font-weight: 800; letter-spacing: -0.02em; }
.push { margin-left: auto; }

/* --- плашки --- */
.badge {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: 12px; font-weight: 700;
  padding: 3px 8px; border-radius: 999px; white-space: nowrap;
}
.b-up { background: var(--good-bg); color: var(--good); }
.b-down { background: var(--bad-bg); color: var(--bad); }
.b-flat { background: var(--card-3); color: var(--ink-2); }
.s-none { background: #3D2A1E; color: var(--orange); }
.s-social { background: #3A3418; color: var(--warn); }
.s-stub { background: #33283F; color: var(--violet); }
.s-bad { background: var(--bad-bg); color: var(--bad); }
.s-mid { background: #22294A; color: #A9BCFB; }
.s-good { background: var(--card-3); color: var(--mute); }

/* --- кнопки и поля --- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 44px; padding: 0 18px;
  border-radius: 14px;
  font: 700 14px 'Manrope', sans-serif;
  text-decoration: none; border: 0; cursor: pointer;
}
.btn-w { background: #FFFFFF; color: var(--bg); }
.btn-w:hover { background: #E4E4E7; color: var(--bg); }
.btn-d { background: var(--card-2); color: var(--ink); }
.btn-d:hover { background: #2E2E33; color: #FFFFFF; }
.btn-sm { min-height: 36px; padding: 0 12px; font-size: 13px; }
.btn[disabled] { opacity: .5; cursor: not-allowed; }
.ibtn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 44px; height: 44px;
  border-radius: 14px;
  background: var(--card); color: var(--ink);
  border: 0; cursor: pointer;
}
.ibtn:hover { background: var(--card-3); }
.in, select.in, textarea.in {
  height: 44px;
  border-radius: 12px; border: 0;
  background: var(--card-2); color: var(--ink);
  padding: 0 14px;
  font: 600 14px 'Manrope', sans-serif;
  width: 100%;
}
textarea.in { height: auto; padding: 10px 14px; font-weight: 500; resize: vertical; }
.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field label { font-size: 13px; color: var(--mute); }
.seg {
  min-height: 44px; min-width: 72px; padding: 0 14px;
  border-radius: 12px; border: 0; cursor: pointer;
  background: var(--card-2); color: var(--ink);
  font: 700 14px 'Manrope', sans-serif;
}
.seg[aria-pressed='true'] { background: #FFFFFF; color: var(--bg); }
/* --- кнопки оценки дизайна --- */
.vote {
  flex: 1 1 0; min-height: 64px;
  border-radius: 16px; border: 0; cursor: pointer;
  font: 800 15px 'Manrope', sans-serif;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
}
.vote small { font-size: 11px; font-weight: 600; opacity: .75; }
.v-bad { background: #F59A92; color: #2A0E0B; }
.v-bad:hover { background: #F7B0A9; }
.v-mid { background: #F6DE7E; color: #2A2205; }
.v-mid:hover { background: #F8E699; }
.v-good { background: #86E3A8; color: #082A15; }
.v-good:hover { background: #A2EBBD; }

.avatar {
  width: 44px; height: 44px; border-radius: 22px;
  background: var(--accent-soft); color: var(--bg);
  display: flex; align-items: center; justify-content: center; font-weight: 800;
}

/* --- таблицы --- */
.tw { overflow-x: auto; }
table { border-collapse: collapse; width: 100%; }
th {
  font-size: 11px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase;
  color: var(--mute); text-align: left; padding: 12px; white-space: nowrap;
}
td { font-size: 14px; padding: 12px; border-top: 1px solid var(--line); vertical-align: middle; }
td.nowrap, th.nowrap { white-space: nowrap; }
.right { text-align: right; }
tr.on td { background: #1F2233; }

/* --- полоски и прогресс --- */
.bar { height: 10px; background: #EEF0EA14; border-radius: 5px; overflow: hidden; }
.bar > span { display: block; height: 100%; background: var(--accent); border-radius: 5px; }
.bar-thin { height: 6px; border-radius: 3px; }
.bar-thin > span { border-radius: 3px; }

/* --- телефон --- */
@media (max-width: 860px) {
  .shell { padding: 8px; }
  .frame { border-radius: 20px; min-height: calc(100vh - 16px); }
  main { padding: 16px; }
  h1 { font-size: 26px; }
  .side {
    flex: 1 1 100%;
    flex-direction: row;
    align-items: center;
    gap: 12px;
    padding: 12px;
    border-right: 0;
    border-bottom: 1px solid var(--card);
    overflow-x: auto;
  }
  .side nav { flex-direction: row; }
  .side nav a::after { display: none; }
  .side .bottom { margin-top: 0; }
}
