/**
 * AccessManagementHub – glassmorphism and glow
 */

.filters {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.viewModeSwitch {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 1.25rem;
}

.viewModeButtons {
  display: flex;
  gap: 0.5rem;
}

.viewModeButton,
.viewModeActive {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  font-size: 0.875rem;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  background: rgba(255, 255, 255, 0.06);
  backdrop-filter: blur(8px);
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.25s ease;
}

.viewModeButton:hover {
  background: rgba(255, 255, 255, 0.1);
  color: var(--text-primary);
  border-color: rgba(242, 88, 67, 0.25);
  box-shadow: 0 0 12px rgba(242, 88, 67, 0.15);
}

.viewModeActive {
  background: rgba(242, 88, 67, 0.15);
  color: var(--primary-color, #f25843);
  border-color: rgba(242, 88, 67, 0.35);
  box-shadow: 0 0 14px rgba(242, 88, 67, 0.2);
}

.mandatesLink {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  font-size: 0.875rem;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  background: rgba(255, 255, 255, 0.06);
  backdrop-filter: blur(8px);
  color: var(--text-secondary);
  text-decoration: none;
  transition: all 0.25s ease;
}

.mandatesLink:hover {
  background: rgba(255, 255, 255, 0.1);
  color: var(--text-primary);
  border-color: rgba(242, 88, 67, 0.25);
  box-shadow: 0 0 12px rgba(242, 88, 67, 0.15);
}

.overviewRow {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.statsCard {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1rem 1.25rem;
  min-width: 140px;
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 12px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
  transition: all 0.3s ease;
}

.statsCard:hover {
  box-shadow:
    0 8px 24px rgba(0, 0, 0, 0.12),
    0 0 16px rgba(242, 88, 67, 0.25);
  transform: translateY(-2px);
  border-color: rgba(242, 88, 67, 0.3);
}

.statsIcon {
  font-size: 1.5rem;
  color: var(--primary-color, #f25843);
  opacity: 0.9;
}

.statsContent {
  display: flex;
  flex-direction: column;
  gap: 0.125rem;
}

.statsValue {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--text-primary);
}

.statsLabel {
  font-size: 0.75rem;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.diagramCard {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 1rem 1.25rem;
  flex: 1;
  min-width: 200px;
  max-width: 400px;
  background: rgba(255, 255, 255, 0.06);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 12px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
}

.diagramContent {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  min-width: 0;
}

.diagramTitle {
  font-size: 0.75rem;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.diagramFlow {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.diagramNode {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--primary-color, #f25843);
  padding: 0.25rem 0.5rem;
  background: rgba(242, 88, 67, 0.15);
  border-radius: 6px;
  border: 1px solid rgba(242, 88, 67, 0.3);
}

.diagramNodes {
  display: flex;
  flex-wrap: wrap;
  gap: 0.375rem;
}

.diagramNodeSmall {
  font-size: 0.75rem;
  padding: 0.2rem 0.4rem;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 4px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: var(--text-secondary);
}

.section {
  margin-top: 1.5rem;
}

.sectionTitle {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-primary);
  margin: 0 0 1rem 0;
}

.instanceGrid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1rem;
}

.instanceCard {
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 14px;
  padding: 1.25rem;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
  transition: all 0.3s ease;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.instanceCard:hover {
  box-shadow:
    0 8px 28px rgba(0, 0, 0, 0.12),
    0 0 20px rgba(242, 88, 67, 0.2);
  transform: translateY(-2px);
  border-color: rgba(242, 88, 67, 0.25);
}

.instanceCardHeader {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.5rem;
}

.instanceLabel {
  font-weight: 600;
  color: var(--text-primary);
  font-size: 1rem;
}

.instanceBadge {
  font-size: 0.7rem;
  padding: 0.2rem 0.5rem;
  border-radius: 6px;
  font-weight: 500;
}

.badgeActive {
  background: rgba(56, 142, 60, 0.2);
  color: #388e3c;
  border: 1px solid rgba(56, 142, 60, 0.4);
}

.badgeInactive {
  background: rgba(158, 158, 158, 0.2);
  color: var(--text-secondary);
  border: 1px solid rgba(158, 158, 158, 0.3);
}

.instanceMeta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  font-size: 0.8125rem;
  color: var(--text-secondary);
}

.instanceActions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: auto;
}

.cardAction {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.4rem 0.75rem;
  font-size: 0.8125rem;
  background: rgba(242, 88, 67, 0.15);
  color: var(--primary-color, #f25843);
  border: 1px solid rgba(242, 88, 67, 0.35);
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.cardAction:hover:not(:disabled) {
  background: rgba(242, 88, 67, 0.25);
  box-shadow: 0 0 12px rgba(242, 88, 67, 0.35);
}

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

:global(.dark-theme) .statsCard,
:global(.dark-theme) .diagramCard,
:global(.dark-theme) .instanceCard {
  background: rgba(0, 0, 0, 0.2);
  border-color: rgba(255, 255, 255, 0.1);
}

:global(.dark-theme) .instanceCard:hover {
  border-color: rgba(242, 88, 67, 0.4);
}
