/* --- Entity Grids & Layouts --- */
.entity-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 1.5rem;
  list-style: none;
  padding: 0;
  margin: 0 0 2rem 0;
}

.entity-list {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  list-style: none;
  padding: 0;
  margin: 0 0 2rem 0;
}

/* --- Reusable Entity Card --- */
.entity-card {
  display: flex;
  flex-direction: column;
  background-color: var(--background-color);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
  overflow: hidden;
  transition:
    transform 0.2s ease,
    box-shadow 0.2s ease;
}

.entity-card:hover {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  transform: translateY(-2px);
}

.entity-card-header {
  padding: 1.2rem;
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  flex-wrap: wrap;
}

html.dark .entity-card-header {
  border-bottom-color: rgba(255, 255, 255, 0.05);
}

.entity-card-title {
  margin: 0;
  font-size: 1.1rem;
  font-weight: 700;
  word-break: break-word;
}

.entity-card-subtitle {
  margin: 0.25rem 0 0 0;
  font-size: 0.85rem;
  opacity: 0.6;
  font-family: var(--font-code);
}

.entity-card-body {
  padding: 1.2rem;
  flex-grow: 1;
}

.entity-card-footer {
  padding: 1rem 1.2rem;
  border-top: 1px solid rgba(0, 0, 0, 0.05);
  background-color: rgba(0, 0, 0, 0.01);
  display: flex;
  justify-content: flex-end;
}

html.dark .entity-card-footer {
  border-top-color: rgba(255, 255, 255, 0.05);
  background-color: rgba(255, 255, 255, 0.02);
}

/* --- Inline Property List (Matches security-context) --- */
.property-list {
  display: grid;
  grid-template-columns: max-content 1fr;
  gap: 0.5rem 1rem;
  font-size: 0.85rem;
  margin: 0;
  align-items: center;
}

.property-list dt {
  font-weight: bold;
  opacity: 0.7;
  text-transform: uppercase;
  font-size: 0.75rem;
  letter-spacing: 0.05em;
}

.property-list dd {
  margin: 0;
  word-break: break-all;
}

/* Internal Nav Tabs */
.view-tabs {
  display: flex;
  gap: 1rem;
  margin-bottom: 2rem;
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 1rem;
}

/* Tab Highlight Logic */
.view-tabs .action-btn {
  border-radius: 6px;
}

.view-tabs .action-btn.active {
  background: rgba(0, 0, 0, 0.08);
  font-weight: 700;
  color: var(--logo-primary);
  /* Highlight via bottom border to match Sidebar logic but adapted for horizontal layout */
  box-shadow: inset 0 -3px 0 var(--logo-primary);
}

html.dark .view-tabs .action-btn.active {
  background: rgba(255, 255, 255, 0.1);
}
