:root {
  color-scheme: dark;
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system,
    BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: #07090c;
  color: #f3f4f6;
}

* {
  box-sizing: border-box;
}

body {
  min-width: 320px;
  min-height: 100vh;
  margin: 0;
  background:
    radial-gradient(
      circle at top left,
      rgba(45, 93, 255, 0.12),
      transparent 32rem
    ),
    #07090c;
}

button,
table {
  font: inherit;
}

.page-shell {
  width: min(1800px, 92vw);
  margin: 0 auto;
  padding: 64px 0;
}

.dashboard-card {
  overflow: hidden;
  border: 1px solid #20242b;
  border-radius: 14px;
  background: #0d1015;
  box-shadow: 0 20px 55px rgba(0, 0, 0, 0.34);
}

.dashboard-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
  padding: 36px 48px;
  border-bottom: 1px solid #20242b;
}

.eyebrow {
  margin: 0 0 8px;
  color: #54d17a;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

h1 {
  margin: 0;
  font-size: clamp(1.7rem, 4vw, 2.4rem);
  line-height: 1.1;
}

.subtitle {
  margin: 9px 0 0;
  color: #9ba3af;
}

#refresh-button {
  flex: 0 0 auto;
  min-width: 105px;
  padding: 10px 18px;
  border: 1px solid #303744;
  border-radius: 8px;
  background: #171c24;
  color: #f8fafc;
  font-weight: 650;
  cursor: pointer;
}

#refresh-button:hover:not(:disabled) {
  border-color: #4b5563;
  background: #202631;
}

#refresh-button:disabled {
  cursor: wait;
  opacity: 0.55;
}

.status-message {
  min-height: 22px;
  margin: 0;
  padding: 18px 48px;
  color: #9ba3af;
  font-size: 0.9rem;
}

.status-message.error {
  color: #f87171;
}

.rate-limit-message {
  margin: 0;
  padding: 14px 48px 18px;
  border-top: 1px solid #20242b;
  color: #9ba3af;
  font-size: 0.9rem;
  line-height: 1.6;
}

.table-container {
  overflow-x: auto;
  border-top: 1px solid #20242b;
  border-bottom: 1px solid #20242b;
}

table {
  width: 100%;
  min-width: 680px;
  border-collapse: collapse;
}

th,
td {
  padding: 22px 36px;
  border-right: 1px solid #20242b;
  border-bottom: 1px solid #20242b;
  text-align: center;
  white-space: nowrap;
}

th:last-child,
td:last-child {
  border-right: 0;
}

tbody tr:last-child td {
  border-bottom: 0;
}

th {
  background: #11151b;
  color: #56d77b;
  font-size: 0.82rem;
  font-weight: 750;
  letter-spacing: 0.03em;
}

th:first-child,
td:first-child {
  text-align: left;
}

th.sortable {
  cursor: pointer;
  user-select: none;
}

th.sortable:hover {
  background: #151b24;
}

th.sort-active {
  background: #131820;
}

.sort-indicator {
  display: inline-block;
  margin-left: 5px;
  font-size: 0.85em;
  font-weight: 400;
  letter-spacing: 0;
}

.sort-neutral {
  opacity: 0.3;
}

.developer-name {
  color: #ffffff;
  font-weight: 700;
}

.commit-count {
  color: #ffffff;
  font-size: 1.15rem;
  font-weight: 750;
}

.total-count {
  color: #ffffff;
  font-size: 1.15rem;
  font-weight: 800;
}

.developer-error-note {
  margin-top: 5px;
  color: #f87171;
  font-size: 0.78rem;
  font-weight: 600;
  cursor: help;
}

.error-cell {
  color: #f87171;
  font-size: 0.88rem;
  font-weight: 650;
  cursor: help;
}

.empty-cell {
  padding: 48px 36px;
  color: #9ba3af;
  text-align: center !important;
}

.dashboard-footer {
  padding: 20px 48px;
  color: #747d89;
  font-size: 0.82rem;
}

@media (max-width: 640px) {
  .page-shell {
    width: min(100% - 20px, 1120px);
    padding: 20px 0;
  }

  .dashboard-header {
    align-items: flex-start;
    flex-direction: column;
    padding: 22px;
  }

  #refresh-button {
    width: 100%;
  }

  .status-message,
  .rate-limit-message,
  .dashboard-footer {
    padding-right: 22px;
    padding-left: 22px;
  }
}
