.template-page-shell {
  display: grid;
  gap: 1rem;
}

.template-page-meta dt {
  margin-bottom: 0.15rem;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--template-muted);
}

.template-page-meta dd {
  margin-bottom: 0.7rem;
}

.template-status-surface .alert,
.template-provider-notice {
  background: var(--template-paper-strong);
  border: 1px solid rgba(27, 34, 48, 0.08);
  box-shadow: 0 0.75rem 2rem rgba(27, 34, 48, 0.06);
}

.template-action-bar {
  padding: 1rem;
  border: 1px solid rgba(27, 34, 48, 0.08);
  border-radius: 1rem;
  background: rgba(255, 255, 255, 0.45);
}

.template-action-bar a[aria-disabled="true"] {
  pointer-events: none;
  opacity: 0.65;
}

.template-shortcut-hint {
  display: inline-flex;
  align-items: center;
  padding: 0.1rem 0.45rem;
  border-radius: 999px;
  background: rgba(27, 34, 48, 0.08);
  color: var(--template-muted);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.template-action-bar .btn {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
}

.template-live-region {
  position: fixed;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
}

.is-busy {
  opacity: 0.75;
}

.template-data-collection-toolbar {
  padding-bottom: 0.25rem;
  border-bottom: 1px solid rgba(27, 34, 48, 0.08);
}

.template-data-collection-search {
  min-width: min(100%, 22rem);
}

.template-data-collection-search form,
.template-data-collection-search {
  width: 100%;
}

.template-data-table thead th {
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--template-muted);
}

.template-sort-button {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  color: inherit;
}

.template-sort-button:hover,
.template-sort-button:focus {
  color: var(--template-accent-deep);
}

.template-sort-indicator::before {
  content: '↕';
  font-size: 0.85rem;
  color: var(--template-muted);
}

.template-sort-button[data-ui-sort-direction="asc"] .template-sort-indicator::before {
  content: '↑';
  color: var(--template-accent-deep);
}

.template-sort-button[data-ui-sort-direction="desc"] .template-sort-indicator::before {
  content: '↓';
  color: var(--template-accent-deep);
}

.template-data-table tbody tr {
  outline: none;
}

.template-data-table tbody tr:focus {
  box-shadow: inset 0 0 0 2px rgba(15, 124, 103, 0.25);
}

.template-data-table tbody td {
  vertical-align: middle;
}

.template-pager {
  padding-top: 1rem;
  border-top: 1px solid rgba(27, 34, 48, 0.08);
}

.template-pager .btn-group {
  flex-wrap: wrap;
}

.template-summary-card,
.template-details-section,
.template-form-shell,
.template-smart-dropdown,
.template-diagnostics-panel,
.template-diagnostics-group,
.template-confirmation-dialog .modal-content {
  background: var(--template-paper-strong);
  border: 1px solid rgba(27, 34, 48, 0.08);
  box-shadow: 0 0.75rem 2rem rgba(27, 34, 48, 0.06);
}

.template-inline-action-form {
  margin: 0;
}

.template-confirmation-dialog .modal-content {
  border-radius: 1rem;
}

.template-confirmation-dialog .modal-header,
.template-confirmation-dialog .modal-footer {
  border-color: rgba(27, 34, 48, 0.08);
}

.template-confirmation-dialog .modal-body {
  color: var(--template-muted);
}

.template-summary-card {
  min-height: 100%;
}

.template-details-section dt {
  margin-bottom: 0.25rem;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--template-muted);
}

.template-details-section dd {
  margin-bottom: 1rem;
}

.template-details-section dd:last-child {
  margin-bottom: 0;
}

.template-form-section-header + .template-form-shell {
  margin-top: 0;
}

.template-smart-dropdown-options {
  display: grid;
  gap: 0.75rem;
}

.template-smart-dropdown-option {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.85rem;
  align-items: start;
  padding: 0.85rem 1rem;
  border-radius: 0.9rem;
  border: 1px solid rgba(27, 34, 48, 0.08);
  background: rgba(255, 255, 255, 0.55);
  cursor: pointer;
}

.template-smart-dropdown-option:hover,
.template-smart-dropdown-option:focus-within {
  border-color: rgba(15, 124, 103, 0.35);
  box-shadow: inset 0 0 0 1px rgba(15, 124, 103, 0.2);
}

.template-smart-dropdown-copy {
  display: grid;
  gap: 0.2rem;
}

.template-smart-dropdown-selector {
  padding-top: 0.15rem;
}

.template-diagnostics-item + .template-diagnostics-item {
  padding-top: 0.85rem;
  border-top: 1px solid rgba(27, 34, 48, 0.08);
}

@media (max-width: 767.98px) {
  .template-page-meta dt,
  .template-page-meta dd {
    margin-bottom: 0.25rem;
  }

  .template-action-bar {
    padding: 0.85rem;
  }

  .template-data-collection-search {
    min-width: 100%;
  }

  .template-smart-dropdown-option {
    grid-template-columns: 1fr;
  }
}