.section-card {
  display: flex;
  flex-direction: column;
  gap: var(--space-5);
}

.section-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: var(--space-4);
}

.section-header h2 {
  margin: 0;
}

.section-header p {
  margin: var(--space-2) 0 0;
  color: var(--color-text-muted);
}

.header-copy {
  display: grid;
  gap: var(--space-1);
}

.total-pill {
  width: fit-content;
  margin-top: var(--space-1);
}

.list-panel,
.detail-panel {
  min-width: 0;
}

.list-panel h3 {
  margin: 0 0 var(--space-2);
  font-size: 1.02rem;
}

.name-cell .primary {
  margin: 0;
  font-weight: 600;
}

.name-cell .secondary {
  margin: 2px 0 0;
  font-size: 0.82rem;
  color: var(--color-text-muted);
}

.email-cell,
.created-at {
  color: var(--color-text-muted);
}

tbody tr {
  cursor: pointer;
}

tbody tr.selected {
  background: #fff5b8;
}

.empty-row {
  cursor: default;
}

.empty-row:hover {
  background: transparent;
}

.detail-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: var(--space-3);
}

.detail-header h3 {
  margin: 0;
}

.detail-chips {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: var(--space-2);
}

.request-id {
  margin: var(--space-2) 0 0;
  display: flex;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 8px;
  font-size: 0.8rem;
  color: var(--color-text-muted);
}

.request-id code {
  display: block;
  max-width: 100%;
  overflow: visible;
  text-overflow: clip;
  white-space: normal;
  overflow-wrap: anywhere;
}

.loading-detail {
  margin: 0;
  color: var(--color-text-muted);
  font-size: 0.85rem;
}

.meta-item {
  margin: 0;
}

.meta-item dt {
  margin: 0;
}

.meta-item dd {
  margin: 0;
  overflow-wrap: anywhere;
  font-size: 0.93rem;
}

.message-box {
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  background: var(--color-neutral-100);
  padding: var(--space-3);
}

.message-box h4 {
  margin: 0 0 var(--space-2);
  font-size: 0.86rem;
  color: var(--color-text-muted);
}

.message-box p {
  margin: 0;
  white-space: pre-wrap;
}

.attachments h4 {
  margin: 0 0 var(--space-2);
}

.attachment-list {
  display: grid;
  gap: var(--space-2);
}

.attachment-item {
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  background: var(--color-bg-card);
  padding: var(--space-3);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--space-3);
  box-shadow: var(--shadow-sm);
}

.filename {
  margin: 0;
  font-weight: 600;
  font-size: 0.92rem;
}

.meta {
  margin: 2px 0 0;
  color: var(--color-text-muted);
  font-size: 0.82rem;
  overflow-wrap: anywhere;
}

.muted {
  color: var(--color-text-muted);
  margin: 0;
}

.error {
  color: var(--color-danger-500);
  margin: 0;
}

.success {
  color: #157347;
  margin: 0;
}

.status-editor {
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  background: var(--color-surface-muted);
  padding: var(--space-3);
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: var(--space-2);
}

.status-editor-field {
  display: grid;
  gap: var(--space-1);
  min-width: 200px;
}

.status-editor-field label {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--color-text-muted);
}

@media (max-width: 760px) {
  .section-header {
    flex-direction: column;
    align-items: stretch;
  }

  .detail-header {
    flex-direction: column;
  }

  .detail-chips {
    justify-content: flex-start;
  }

  .attachment-item {
    flex-direction: column;
    align-items: flex-start;
    padding: var(--space-3);
  }

  .request-id code {
    max-width: 100%;
  }

  .status-editor {
    align-items: stretch;
  }

  .status-editor button {
    width: 100%;
  }
}

@media (max-width: 520px) {
  .ui-data-table th,
  .ui-data-table td {
    padding: var(--space-2);
    font-size: 0.86rem;
  }
}
