.card {
  grid-column: span 12;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.88);
  box-shadow: var(--shadow-md);
  overflow: hidden;
  transition:
    transform 160ms ease,
    border-color 160ms ease,
    box-shadow 160ms ease,
    background 160ms ease;
}

.card:hover {
  transform: translateY(-1px);
  border-color: var(--color-border-strong);
  box-shadow: 0 24px 62px rgba(22, 24, 38, 0.12);
}

.card:target {
  border-color: color-mix(in srgb, var(--color-brand) 54%, var(--color-border) 46%);
  box-shadow:
    0 0 0 3px var(--color-brand-soft),
    var(--shadow-md);
}

.card .hd {
  padding: 18px 18px 0;
}

.card .hd h2,
.card .hd h3 {
  margin: 0;
}

.card .hd h2 {
  font-size: 16px;
}

.card .hd h3 {
  font-size: 15px;
}

.card .hd p {
  margin: 8px 0 0;
  font-size: 12px;
  color: var(--color-text-muted);
  line-height: 1.4;
}

.card .bd {
  padding: 18px;
}

.agent-form-compact .card .hd {
  padding: 14px 14px 0;
}

.agent-form-compact .card .bd {
  padding: 14px;
}

.hero-card {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  margin-bottom: 14px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 18px;
  box-shadow: var(--shadow-md);
  background: linear-gradient(140deg, rgba(255, 255, 255, 0.96) 0%, rgba(103, 63, 180, 0.05) 100%);
}

.hero-card h2 {
  margin: 0;
  font-size: 21px;
}

.hero-card p {
  margin: 6px 0 0;
  font-size: 13px;
  color: var(--color-text-muted);
}

.hero-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 16px;
}

.group-card {
  margin-top: 16px;
}

.group-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.agents-grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 14px;
}

.agent-tile {
  grid-column: span 6;
  display: flex;
  justify-content: space-between;
  gap: 14px;
  border: 1px solid var(--color-line);
  border-radius: var(--radius-md);
  padding: 14px;
  background: rgba(255, 255, 255, 0.92);
  transition: border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease, background 160ms ease;
}

.agent-tile:hover {
  transform: translateY(-1px);
  border-color: rgba(103, 63, 180, 0.26);
  box-shadow: 0 18px 46px rgba(22, 24, 38, 0.08);
}

.agent-main h4 {
  margin: 0;
  font-size: 15px;
}

.agent-id {
  display: inline-flex;
  margin-top: 7px;
  padding: 4px 8px;
  border-radius: 999px;
  border: 1px solid var(--color-line);
  color: var(--color-text-muted);
  font-size: 11px;
}

.agent-topic {
  margin: 10px 0 0;
  color: var(--color-text-muted);
  font-size: 13px;
}

.agent-actions {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
}

.empty-state .bd {
  display: flex;
  align-items: center;
  justify-content: flex-start;
}

.alert {
  border: 1px solid rgba(192, 57, 43, 0.3);
  border-radius: var(--radius-md);
  background: rgba(192, 57, 43, 0.08);
  color: #7a231a;
  padding: 12px;
  font-size: 12px;
  line-height: 1.35;
}

.footerbar,
.wizard-footer,
.wizard-nav-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 18px;
}

.wizard-banner {
  margin-bottom: 16px;
}

.wizard-steps {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.wizard-step {
  border: 1px solid var(--color-line);
  border-radius: 999px;
  background: #fff;
  color: var(--color-text-muted);
  padding: 8px 11px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}

.wizard-step.active,
.wizard-step[aria-selected="true"] {
  border-color: rgba(103, 63, 180, 0.28);
  color: #fff;
  background: linear-gradient(140deg, var(--color-brand), var(--color-brand-alt));
}
