* {
  box-sizing: border-box;
}

html {
  font-family:
    Inter,
    ui-sans-serif,
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
  background: #f6f8fc;
  color: #202124;
}

body {
  margin: 0;
  min-height: 100vh;
}

button {
  font: inherit;
}

.login-page {
  display: grid;
  place-items: center;
  padding: 32px;
}

.login-card {
  width: min(100%, 520px);
  padding: 36px;
  background: #fff;
  border: 1px solid #dadce0;
  border-radius: 18px;
  box-shadow: 0 10px 30px rgb(60 64 67 / 10%);
}

.login-card h1,
.admin-header h1 {
  margin: 4px 0 14px;
}

.login-card p {
  line-height: 1.6;
  color: #5f6368;
}

.eyebrow {
  margin: 0;
  color: #1a73e8;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.primary-button,
.secondary-button {
  border-radius: 999px;
  padding: 11px 18px;
  cursor: pointer;
}

.primary-button {
  margin-top: 12px;
  border: 0;
  background: #1a73e8;
  color: #fff;
}

.secondary-button {
  border: 1px solid #dadce0;
  background: #fff;
  color: #202124;
}

button:disabled {
  cursor: wait;
  opacity: 0.65;
}

.status {
  min-height: 24px;
  margin-bottom: 0;
  font-size: 14px;
}

.dashboard-page {
  background: #f6f8fc;
}

.admin-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 24px 32px;
  background: #fff;
  border-bottom: 1px solid #dadce0;
}

.dashboard-shell {
  width: min(100%, 1280px);
  margin: 0 auto;
  padding: 36px 32px 56px;
}

.dashboard-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 24px;
}

.dashboard-heading h2 {
  margin: 0 0 6px;
  font-size: 28px;
}

.dashboard-heading p,
.card-heading p {
  margin: 0;
  color: #5f6368;
  line-height: 1.5;
}

.dashboard-actions {
  display: flex;
  align-items: center;
  gap: 14px;
}

.updated-at {
  color: #5f6368;
  font-size: 13px;
  white-space: nowrap;
}

.analytics-status {
  margin-bottom: 20px;
  padding: 14px 16px;
  background: #fff;
  border: 1px solid #dadce0;
  border-radius: 12px;
  color: #5f6368;
}

.analytics-status.error {
  border-color: #f1b8b3;
  background: #fce8e6;
  color: #a50e0e;
}

.metrics-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  margin-bottom: 20px;
}

.metric-card,
.analytics-card {
  background: #fff;
  border: 1px solid #dadce0;
  border-radius: 16px;
  box-shadow: 0 4px 16px rgb(60 64 67 / 6%);
}

.metric-card {
  padding: 22px;
}

.metric-label {
  display: block;
  margin-bottom: 10px;
  color: #5f6368;
  font-size: 14px;
  font-weight: 600;
}

.metric-value {
  display: block;
  font-size: 32px;
  line-height: 1;
  letter-spacing: -0.02em;
}

.analytics-card {
  margin-top: 20px;
  overflow: hidden;
}

.card-heading {
  padding: 22px 24px 18px;
  border-bottom: 1px solid #e8eaed;
}

.card-heading h3 {
  margin: 0 0 5px;
  font-size: 18px;
}

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

table {
  width: 100%;
  border-collapse: collapse;
  white-space: nowrap;
}

th,
td {
  padding: 14px 24px;
  border-bottom: 1px solid #eef0f2;
  text-align: left;
  font-size: 14px;
}

th {
  background: #fafbfd;
  color: #5f6368;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.025em;
  text-transform: uppercase;
}

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

tbody tr:hover {
  background: #fafbfd;
}

.number-cell {
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.community-section {
  margin-top: 44px;
}

.community-heading {
  margin-bottom: 20px;
}

.community-metrics {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.activity-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.activity-item {
  display: flex;
  flex-direction: column;
  gap: 5px;
  padding: 16px 24px;
  border-bottom: 1px solid #eef0f2;
}

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

.activity-item strong {
  font-size: 14px;
  font-weight: 600;
}

.activity-meta {
  color: #5f6368;
  font-size: 13px;
}

[hidden] {
  display: none !important;
}

@media (max-width: 760px) {
  .metrics-grid,
  .community-metrics {
    grid-template-columns: 1fr;
  }

  .dashboard-heading {
    flex-direction: column;
  }

  .dashboard-actions {
    width: 100%;
    justify-content: space-between;
  }
}

@media (max-width: 640px) {
  .login-page,
  .dashboard-shell {
    padding: 20px;
  }

  .login-card {
    padding: 24px;
  }

  .admin-header {
    padding: 20px;
  }

  .admin-header h1 {
    font-size: 22px;
  }

  th,
  td {
    padding: 12px 16px;
  }
}
