.provider-card {
  background: var(--bg-primary);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.provider-card:hover {
  border-color: rgba(91, 99, 211, 0.3);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.04);
}

.provider-card.expanded {
  border-color: rgba(91, 99, 211, 0.25);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.provider-card.unavailable {
  opacity: 0.7;
}

.provider-card.unavailable:hover {
  border-color: var(--border);
  opacity: 0.8;
  box-shadow: none;
}

/* Header */
.provider-card-header {
  display: flex;
  align-items: center;
  gap: 12px;
}

.provider-card-heading {
  flex: 1;
  min-width: 0;
  margin: 0;
}

.provider-card-toggle {
  width: 100%;
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 18px;
  border: 0;
  background: transparent;
  cursor: pointer;
  text-align: left;
  user-select: none;
  transition: background 0.1s ease;
}

.provider-card-toggle:hover {
  background: var(--bg-hover);
}

.provider-card-toggle:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: -2px;
}

.provider-card-left {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.chevron {
  color: var(--text-muted);
  transition: transform 0.2s ease;
  flex-shrink: 0;
}

.chevron.open {
  transform: rotate(90deg);
}

.provider-name {
  font-size: 15px;
  font-weight: 600;
  font-family: var(--font-mono);
  color: var(--text-primary);
  letter-spacing: -0.3px;
}

.provider-badges {
  display: flex;
  gap: 5px;
}

.badge {
  font-size: 10px;
  font-weight: 600;
  padding: 2px 7px;
  border-radius: 4px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.badge-green {
  background: var(--green-bg);
  color: var(--green);
}

.badge-yellow {
  background: var(--yellow-bg);
  color: var(--yellow);
}

.badge-blue {
  background: var(--blue-bg);
  color: var(--blue);
}

.provider-card-right {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

.provider-card-actions {
  display: flex;
  align-items: center;
  padding-right: 18px;
}

.model-count {
  font-size: 12px;
  color: var(--text-muted);
  font-family: var(--font-mono);
}

/* Sync button */
.sync-btn {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 5px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--text-secondary);
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s ease;
}

.sync-btn:hover:not(:disabled) {
  background: var(--accent-bg);
  border-color: var(--accent);
  color: var(--accent);
}

.sync-btn:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.sync-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.sync-icon.spinning {
  animation: spin 1s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* Body */
.provider-card-body {
  padding: 0 18px 16px;
  border-top: 1px solid var(--border-subtle);
}

.missing-reqs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 12px 0;
}

.missing-tag {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 12px;
  padding: 3px 8px;
  border-radius: 4px;
  background: var(--red-bg);
  border: 1px solid rgba(220, 38, 38, 0.1);
  color: var(--text-secondary);
}

.missing-type {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--red);
  letter-spacing: 0.5px;
}

.missing-tag code {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-primary);
}

.models-loading {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 16px 0;
  color: var(--text-secondary);
  font-size: 13px;
}

.spinner-small {
  width: 14px;
  height: 14px;
  border: 2px solid var(--border);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

.models-error {
  padding: 10px 14px;
  margin-top: 10px;
  background: var(--red-bg);
  border: 1px solid rgba(220, 38, 38, 0.1);
  border-radius: var(--radius-sm);
  font-size: 13px;
  color: var(--red);
}

.source-badge {
  display: inline-block;
  font-size: 11px;
  color: var(--yellow);
  background: var(--yellow-bg);
  padding: 4px 10px;
  border-radius: 4px;
  margin: 12px 0 8px;
}

.no-models {
  padding: 16px 0;
  color: var(--text-muted);
  font-size: 13px;
}
