* {
  box-sizing: border-box;
}

body {
  background: #f3f6fa;
  color: #172033;
  font: 14px/1.45 system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  margin: 0;
}

.admin-shell {
  display: grid;
  gap: 18px;
  margin: 0 auto;
  max-width: 1320px;
  padding: 28px;
}

header,
.panel-head,
.pager {
  align-items: center;
  display: flex;
  gap: 12px;
  justify-content: space-between;
}

header span {
  color: #0f766e;
  font-weight: 850;
}

h1,
h2 {
  letter-spacing: 0;
  margin: 0;
}

h1 {
  font-size: 34px;
}

h2 {
  font-size: 20px;
}

a {
  color: #0f766e;
  font-weight: 800;
  text-decoration: none;
}

.panel {
  background: #fff;
  border: 1px solid #dce5ef;
  border-radius: 8px;
  box-shadow: 0 12px 34px rgba(23, 32, 51, 0.06);
  display: grid;
  gap: 14px;
  padding: 18px;
}

.login-form,
.filters {
  display: grid;
  gap: 10px;
}

.login-form {
  max-width: 420px;
}

.filters {
  grid-template-columns: minmax(220px, 1fr) 180px 160px 120px;
}

label {
  color: #46556a;
  display: grid;
  font-size: 13px;
  font-weight: 800;
  gap: 6px;
}

input,
select {
  border: 1px solid #bdc8d7;
  border-radius: 6px;
  color: #172033;
  font: inherit;
  min-height: 40px;
  padding: 9px 10px;
}

button {
  background: #0f766e;
  border: 0;
  border-radius: 6px;
  color: #fff;
  cursor: pointer;
  font: 800 13px/1 system-ui, sans-serif;
  min-height: 40px;
  padding: 10px 13px;
}

button:hover {
  background: #115e59;
}

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

.stat {
  background: #fff;
  border: 1px solid #dce5ef;
  border-radius: 8px;
  display: grid;
  gap: 4px;
  padding: 16px;
}

.stat strong {
  font-size: 26px;
}

.stat span {
  color: #657386;
  font-size: 12px;
  font-weight: 800;
}

.table-wrap {
  overflow: auto;
}

table {
  border-collapse: collapse;
  min-width: 900px;
  width: 100%;
}

th,
td {
  border-bottom: 1px solid #e4ebf3;
  padding: 10px;
  text-align: left;
  vertical-align: top;
}

th {
  color: #526071;
  font-size: 12px;
  font-weight: 850;
}

td {
  color: #172033;
}

.tweet-text {
  max-width: 460px;
  white-space: pre-wrap;
}

.metric-cell {
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.detail-button {
  background: #526071;
  min-height: 32px;
  padding: 8px 10px;
}

.detail-row td {
  background: #f8fafc;
  padding: 0;
}

.detail-box {
  display: grid;
  gap: 10px;
  padding: 14px;
}

.detail-box strong {
  display: block;
}

.detail-box pre {
  background: #0f172a;
  border-radius: 6px;
  color: #e2e8f0;
  font: 12px/1.45 ui-monospace, SFMono-Regular, Consolas, monospace;
  margin: 0;
  max-height: 280px;
  overflow: auto;
  padding: 12px;
  white-space: pre-wrap;
}

.status {
  border-radius: 999px;
  display: inline-flex;
  font-size: 12px;
  font-weight: 850;
  padding: 4px 8px;
}

.status.saved {
  background: #e8f5f3;
  color: #0f766e;
}

.status.not_relevant {
  background: #fff1f2;
  color: #be123c;
}

#message {
  color: #526071;
  min-height: 20px;
}

#message.error {
  color: #b91c1c;
}

@media (max-width: 920px) {
  .filters,
  .stats-grid {
    grid-template-columns: 1fr;
  }

  .admin-shell {
    padding: 16px;
  }
}
