/* Gin theme integration */
.nodehive-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: var(--gin-spacing-m, 1rem);
  margin-bottom: var(--gin-spacing-l, 1.5rem);
}

a.stat-item,
.stat-item {
  background: var(--gin-bg-layer, #ffffff);
  border: 1px solid var(--gin-border-color-layer, #d4d4d8);
  border-radius: var(--gin-border-s, 0.25rem);
  padding: var(--gin-spacing-m, 1rem);
  display: flex;
  align-items: center;
  gap: var(--gin-spacing-m, 1rem);
  text-decoration: none;
  color: inherit;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

a.stat-item:hover {
  border-color: var(--gin-color-primary, #0073aa);
  box-shadow: var(--gin-shadow-s, 0 1px 4px rgba(0, 0, 0, 0.08));
  text-decoration: none;
}

.stat-icon {
  color: var(--gin-color-primary, #0073aa);
  line-height: 1;
  opacity: 0.8;
  flex-shrink: 0;
}

.stat-icon svg {
  display: block;
}

.stat-content {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.stat-value {
  font-size: var(--gin-font-size-xl, 1.5rem);
  font-weight: var(--gin-font-weight-bold, 600);
  color: var(--gin-color-title, #1d1d21);
  line-height: 1;
}

.stat-subvalue {
  font-size: var(--gin-font-size-xs, 0.75rem);
  color: var(--gin-color-text, #52525b);
  line-height: 1;
  display: block;
  margin-top: 2px;
}

.stat-label {
  font-size: var(--gin-font-size-xs, 0.75rem);
  color: var(--gin-color-text-light, #52525b);
  line-height: 1;
  margin-top: 4px;
  display: block;
}

.nodehive-section-heading {
  margin: var(--gin-spacing-m, 1rem) 0 var(--gin-spacing-xs, 0.5rem) 0;
  font-size: var(--gin-font-size-m, 1rem);
  font-weight: var(--gin-font-weight-bold, 600);
  color: var(--gin-color-title, #1d1d21);
}

.nodehive-section-heading:first-of-type {
  margin-top: 0;
}

.nodehive-admin-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: var(--gin-spacing-xs, 0.5rem);
  margin-bottom: var(--gin-spacing-m, 1rem);
}

a.nodehive-admin-card {
  background: var(--gin-bg-layer, #ffffff);
  border: 1px solid var(--gin-border-color-layer, #d4d4d8);
  border-radius: var(--gin-border-s, 0.25rem);
  padding: var(--gin-spacing-s, 0.75rem);
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  gap: var(--gin-spacing-s, 0.75rem);
  text-decoration: none;
  color: inherit;
}

a.nodehive-admin-card:hover {
  border-color: var(--gin-color-primary, #0073aa);
  box-shadow: var(--gin-shadow-s, 0 1px 4px rgba(0, 0, 0, 0.08));
  text-decoration: none;
}

a.nodehive-admin-card .card-icon {
  color: var(--gin-color-primary, #0073aa);
  line-height: 1;
  opacity: 0.8;
  flex-shrink: 0;
}

a.nodehive-admin-card .card-icon svg {
  display: block;
}

a.nodehive-admin-card .card-content {
  display: flex;
  flex-direction: column;
  gap: 2px;
  flex: 1;
  min-width: 0;
}

a.nodehive-admin-card .card-title {
  font-size: var(--gin-font-size-s, 0.875rem);
  font-weight: var(--gin-font-weight-bold, 600);
  color: var(--gin-color-title, #1d1d21);
  margin: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  display: block;
}

a.nodehive-admin-card:hover .card-title {
  color: var(--gin-color-primary, #0073aa);
}

a.nodehive-admin-card .card-description {
  color: var(--gin-color-text-light, #52525b);
  font-size: var(--gin-font-size-xs, 0.75rem);
  line-height: 1.3;
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
  a.stat-item,
  .stat-item,
  a.nodehive-admin-card {
    background: var(--gin-bg-layer, #27272a);
    border-color: var(--gin-border-color-layer, #3f3f46);
  }
}

@media (max-width: 768px) {
  .nodehive-admin-grid {
    grid-template-columns: 1fr;
  }
}
