.adminBody {
  background-color: #1e2228;
}

.adminHeader {
  position: sticky;
  top: 0;
  z-index: 2;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 20px;
  border-bottom: 1px solid #2c323b;
  background-color: #191c21;
}
.adminBrand {
  display: flex;
  align-items: baseline;
  gap: 14px;
}
.adminTitle {
  margin: 0;
  font-size: 20px;
  color: #eef2f8;
}
.adminNav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px;
  font-size: 13px;
}
.adminNav a {
  color: #8fb4ff;
  text-decoration: none;
}
.adminNav a:hover {
  text-decoration: underline;
}
.navCount {
  padding: 0 6px;
  border-radius: 8px;
  background-color: #2a3039;
  color: #d4dae3;
  font-size: 11px;
}

.adminGrid {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr) minmax(0, 1fr);
  gap: 16px;
  padding: 16px 20px 32px;
  align-items: start;
}
@media (max-width: 1280px) {
  .adminGrid {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  }
  #stats {
    grid-column: 1 / -1;
  }
}
@media (max-width: 760px) {
  .adminGrid {
    grid-template-columns: minmax(0, 1fr);
    padding: 12px 16px 24px;
  }
}

.adminPanel {
  min-width: 0;
  padding: 14px 16px 18px;
  border: 1px solid #2c323b;
  border-radius: 10px;
  background-color: #191c21;
  scroll-margin-top: 64px;
}
@media (min-width: 1281px) {
  .adminPanel {
    max-height: calc(100vh - 92px);
    overflow-y: auto;
    position: sticky;
    top: 70px;
  }
}

.panelHead {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 12px;
}
.panelHeading {
  margin: 0;
  font-size: 17px;
  color: #eef2f8;
}
.panelMeta {
  color: #87909e;
  font-size: 12px;
  text-decoration: none;
}
a.panelMeta {
  color: #8fb4ff;
}
.panelNote {
  margin: 12px 0 0;
  color: #87909e;
  font-size: 12px;
  line-height: 1.5;
}
.panelNote a {
  color: #8fb4ff;
}

.periodSwitch {
  display: flex;
  gap: 2px;
  padding: 2px;
  border: 1px solid #2c323b;
  border-radius: 6px;
}
.periodLink {
  padding: 2px 8px;
  border-radius: 4px;
  color: #a0adbf;
  font-size: 12px;
  text-decoration: none;
}
.periodLink:hover {
  color: #eef2f8;
}
.periodLink.active {
  background-color: #2a3039;
  color: #eef2f8;
}

.tileRow {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  gap: 8px;
}
.tile {
  padding: 10px 12px;
  border: 1px solid #2c323b;
  border-radius: 8px;
  background-color: #1e2228;
}
.tileValue {
  font-size: 24px;
  font-weight: 700;
  color: #eef2f8;
  font-variant-numeric: tabular-nums;
}
.tileLabel {
  font-size: 11px;
  color: #87909e;
}

.blockTitle {
  margin: 18px 0 8px;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #a0adbf;
}

.dayChart,
.hourChart {
  display: flex;
  align-items: flex-end;
  gap: 2px;
  height: 110px;
  padding-bottom: 1px;
  border-bottom: 1px solid #353c47;
}
.hourChart {
  height: 60px;
}
.dayBar,
.hourBar {
  flex: 1;
  min-width: 2px;
  height: max(var(--h), 2px);
  border-radius: 4px 4px 0 0;
  background-color: #619aff;
  opacity: 0.9;
}
.dayBar:hover,
.hourBar:hover {
  opacity: 1;
  background-color: #8fb4ff;
}
.hourBar {
  background-color: #5f7fb8;
}
.chartAxis {
  display: flex;
  justify-content: space-between;
  margin-top: 4px;
  color: #87909e;
  font-size: 11px;
  font-variant-numeric: tabular-nums;
}

.rankTable {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
.rankTable td {
  padding: 3px 4px;
  border-top: 1px solid #262b33;
}
.rankName {
  max-width: 0;
  width: 45%;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  color: #d4dae3;
}
.rankBar {
  width: 35%;
}
.rankBar span {
  display: block;
  height: 6px;
  min-width: 2px;
  border-radius: 3px;
  background-color: #619aff;
}
.rankCount,
.rankShare {
  width: 1%;
  white-space: nowrap;
  text-align: right;
  color: #eef2f8;
  font-variant-numeric: tabular-nums;
}
.rankShare {
  color: #87909e;
}
.rankHead td {
  color: #87909e;
  font-size: 11px;
}
.rankTable.compact {
  font-size: 12px;
}
.rankTable.compact .rankName {
  width: 55%;
}
.flag {
  font-size: 15px;
}

.miniGrid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  column-gap: 16px;
}

.compactBars {
  margin-bottom: 12px;
}
.adminPanel .reviewCard {
  margin-bottom: 10px;
}

.newsForm {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 16px;
  padding: 12px;
  border: 1px solid #2c323b;
  border-radius: 8px;
  background-color: #1e2228;
}
.newsForm textarea {
  resize: vertical;
  font-family: inherit;
}
.newsForm .analyzeButton {
  align-self: flex-start;
}
.newsForm .fieldLabel {
  margin-top: 4px;
}
.checkLabel {
  display: flex;
  align-items: center;
  gap: 6px;
  color: #a0adbf;
  font-size: 13px;
}

.newsItem {
  margin-bottom: 10px;
  padding: 12px 14px;
  border: 1px solid #353c47;
  border-left: 4px solid #5dc98b;
  border-radius: 8px;
  background-color: #252a32;
}
.newsItem.draft {
  border-left-color: #87909e;
  opacity: 0.8;
}
.newsItem.public {
  border-left-color: #619aff;
  padding: 14px 18px;
}
.newsHeader {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 8px;
}
.newsTitle {
  margin: 0;
  font-size: 15px;
  color: #eef2f8;
  overflow-wrap: anywhere;
}
.newsItem.public .newsTitle {
  margin-top: 4px;
  font-size: 18px;
}
.newsState {
  color: #87909e;
  font-size: 11px;
  text-transform: uppercase;
}
.newsActions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 10px;
}
.newsActions a.groupAction {
  text-decoration: none;
}
.dangerAction {
  color: #ff8f97;
}

.setupSteps {
  display: flex;
  gap: 16px;
  margin: 0 0 16px;
  padding: 0;
  list-style: none;
  counter-reset: step;
  font-size: 13px;
  color: #87909e;
}
.setupSteps li::before {
  counter-increment: step;
  content: counter(step) ". ";
}
.setupSteps li.current {
  color: #eef2f8;
  font-weight: 600;
}
.setupSteps li.done {
  color: #5dc98b;
}

.qrBox {
  display: flex;
  justify-content: center;
  margin: 0 auto 12px;
  padding: 12px;
  width: fit-content;
  border-radius: 8px;
  background-color: #ffffff;
}
.qrBox svg {
  display: block;
  width: 220px;
  height: 220px;
}
.keyLine {
  color: #a0adbf;
  font-size: 13px;
  line-height: 1.6;
  text-align: center;
}
.setupKey {
  font-size: 15px;
  letter-spacing: 0.08em;
  color: #eef2f8;
  user-select: all;
}

.securityCard {
  margin-bottom: 20px;
}
.securityCard .feedbackForm {
  margin-top: 8px;
}

.reviewFooter {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  margin-top: 10px;
}
.reviewFooter .reviewEmail {
  margin-top: 0;
}
