.admin-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 22px 0;
  gap: 12px;
  flex-wrap: wrap;
}

.admin-header .actions {
  display: flex;
  gap: 10px;
  align-items: center;
}

.login-wrap {
  max-width: 420px;
  margin: 8vh auto 0;
}

.login-wrap h1 {
  font-size: 28px;
  margin: 0 0 6px;
}

.login-wrap p {
  color: var(--muted);
  margin: 0 0 22px;
  font-size: 14.5px;
}

label.field {
  display: block;
  font-size: 13px;
  font-weight: 700;
  color: var(--muted);
  margin-bottom: 6px;
}

input[type="password"],
input[type="search"] {
  width: 100%;
  font: inherit;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1.5px solid var(--line);
  background: var(--cream);
  color: var(--ink);
}

input[type="password"]:focus,
input[type="search"]:focus {
  outline: 2px solid var(--sage);
  border-color: var(--green);
}

.full {
  width: 100%;
  margin-top: 16px;
}

.status {
  margin-top: 14px;
  font-size: 13.5px;
  min-height: 20px;
  color: var(--muted);
}

.status.error {
  color: var(--red);
}

.status.ok {
  color: var(--green-dark);
}

.stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 12px;
  margin-bottom: 18px;
}

.stat {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 16px 18px;
}

.stat small {
  display: block;
  color: var(--muted);
  font-size: 12.5px;
  font-weight: 600;
  margin-bottom: 4px;
}

.stat strong {
  font-size: 25px;
  letter-spacing: -0.02em;
}

.stat.accent strong {
  color: var(--green-dark);
}

.panel {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px;
  margin-bottom: 18px;
}

.panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
  flex-wrap: wrap;
}

.panel-head h2 {
  font-size: 18px;
  margin: 0;
}

.legend {
  display: flex;
  gap: 16px;
  font-size: 13px;
  color: var(--muted);
}

.legend i {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 3px;
  margin-right: 6px;
}

.chart-box {
  width: 100%;
  overflow: hidden;
}

.chart-box svg {
  display: block;
  width: 100%;
  height: auto;
}

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

th {
  text-align: left;
  color: var(--muted);
  font-size: 12.5px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 8px 10px;
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
}

td {
  padding: 10px;
  border-bottom: 1px solid var(--line);
  vertical-align: middle;
}

tr:last-child td {
  border-bottom: 0;
}

.user-cell {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 210px;
}

.avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  object-fit: cover;
  background: var(--sage);
  display: grid;
  place-items: center;
  font-size: 13px;
  font-weight: 700;
  color: var(--green-dark);
  flex: 0 0 auto;
}

.user-cell .meta {
  line-height: 1.3;
}

.user-cell .meta strong {
  display: block;
  font-size: 14px;
}

.user-cell .meta span {
  color: var(--muted);
  font-size: 12.5px;
}

.badge {
  display: inline-block;
  font-size: 11.5px;
  font-weight: 700;
  border-radius: 999px;
  padding: 3px 9px;
  background: var(--sage);
  color: var(--green-dark);
}

.badge.muted {
  background: var(--sand);
  color: var(--muted);
}

.mono {
  font-variant-numeric: tabular-nums;
}

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

.empty {
  color: var(--muted);
  font-size: 14px;
  padding: 18px 0;
  text-align: center;
}

@media (max-width: 640px) {
  .stat strong {
    font-size: 21px;
  }
}
