.reflective-card {
  position: relative;
  box-sizing: border-box;
  width: var(--rc-width, 320px);
  height: var(--rc-height, 460px);
  max-width: 100%;
  perspective: 900px;
  color: var(--rc-ink, #f4f4f5);
  touch-action: pan-y;
  user-select: none;
  -webkit-user-select: none;
}

.reflective-card__body {
  position: relative;
  box-sizing: border-box;
  width: 100%;
  height: 100%;
  overflow: hidden;
  border-radius: var(--rc-radius, 24px);
  background: var(--rc-base, #1d1c22);
  box-shadow: var(--rc-shadow, 0 22px 44px -20px rgba(0, 0, 0, 0.8), 0 6px 16px -8px rgba(0, 0, 0, 0.5));
  transform: translate3d(0, var(--rc-lift, 0px), 0) rotateX(var(--rc-rotate-x, 0deg)) rotateY(var(--rc-rotate-y, 0deg));
  opacity: var(--rc-presence, 1);
  isolation: isolate;
  will-change: transform;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.reflective-card__canvas {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  border-radius: inherit;
}

.reflective-card__content {
  position: relative;
  z-index: 1;
  box-sizing: border-box;
  display: flex;
  height: 100%;
  flex-direction: column;
  padding: var(--rc-pad, 22px);
  pointer-events: auto;
}

.reflective-card__header {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 13px;
  line-height: 20px;
}

.reflective-card__badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--rc-ink, #f4f4f5);
  font-weight: 500;
  background: rgba(255, 255, 255, 0.08);
  padding: 4px 10px;
  border-radius: 9999px;
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.reflective-card__status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
  color: var(--rc-muted, rgba(244, 244, 245, 0.6));
  font-size: 12px;
  font-weight: 500;
}

.reflective-card__dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--rc-status, #22c55e);
  box-shadow: 0 0 8px var(--rc-status, #22c55e);
}

.reflective-card__avatar-preview {
  display: flex;
  justify-content: center;
  align-items: center;
  margin: auto 0;
  padding: 12px 0;
}

.reflective-card__avatar-circle {
  width: 96px;
  height: 96px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.2);
  background: radial-gradient(circle at 30% 30%, rgba(255, 255, 255, 0.25), rgba(0, 0, 0, 0.6));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 36px;
  font-weight: 700;
  color: #ffffff;
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.5), inset 0 1px 2px rgba(255, 255, 255, 0.4);
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(4px);
}

.reflective-card__identity {
  margin-top: auto;
}

.reflective-card__name {
  margin: 0;
  color: var(--rc-ink, #f4f4f5);
  font-size: 22px;
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.2;
  text-wrap: balance;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.6);
}

.reflective-card__role {
  margin: 6px 0 0;
  color: var(--rc-muted, rgba(244, 244, 245, 0.65));
  font-size: 13.5px;
  line-height: 1.4;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
}

.reflective-card__footer {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin-top: 20px;
  padding-top: 14px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.reflective-card__id {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 4px;
}

.reflective-card__label {
  color: var(--rc-muted, rgba(244, 244, 245, 0.6));
  font-size: 11.5px;
  line-height: 15px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.reflective-card__value {
  overflow: hidden;
  color: var(--rc-ink, #f4f4f5);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 13.5px;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.03em;
  line-height: 18px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.reflective-card__tile {
  position: relative;
  box-sizing: border-box;
  display: flex;
  width: 40px;
  height: 40px;
  flex: none;
  align-items: center;
  justify-content: center;
  border-radius: var(--rc-tile-radius, 12px);
  background: var(--rc-tile, linear-gradient(180deg, #3a3644 0%, #27242f 100%));
  box-shadow: var(--rc-tile-shadow, 0 4px 10px -4px rgba(0, 0, 0, 0.7));
  color: var(--rc-muted, rgba(244, 244, 245, 0.6));
  cursor: pointer;
  transition: transform 0.15s ease, color 0.15s ease;
}

.reflective-card__tile:hover {
  transform: scale(1.06);
  color: #ffffff;
}

.reflective-card__tile::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  box-shadow:
    inset 0 0 0 1px var(--rc-tile-edge, rgba(255, 255, 255, 0.07)),
    inset 0 1px 0 var(--rc-tile-highlight, rgba(255, 255, 255, 0.12));
  pointer-events: none;
}

.reflective-card__rim {
  position: absolute;
  inset: 0;
  z-index: 2;
  border-radius: inherit;
  box-shadow:
    inset 0 0 0 1px var(--rc-rim, rgba(255, 255, 255, 0.07)),
    inset 0 1px 0 var(--rc-rim-highlight, rgba(255, 255, 255, 0.1));
  pointer-events: none;
}

.reflective-card__media {
  position: absolute;
  top: 0;
  left: 0;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

/* Modal or dropdown wrapper for sidebar avatar click */
.reflective-profile-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(8px);
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  pointer-events: none;
  /* The card's children set pointer-events: auto, so a closed overlay must also be invisible. */
  visibility: hidden;
  transition:
    opacity 0.25s ease,
    visibility 0.25s;
}

.reflective-profile-modal-backdrop.is-open {
  opacity: 1;
  pointer-events: auto;
  visibility: visible;
}

.reflective-profile-modal-dialog {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  animation: rcModalPop 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes rcModalPop {
  from {
    transform: scale(0.92) translateY(12px);
    opacity: 0;
  }
  to {
    transform: scale(1) translateY(0);
    opacity: 1;
  }
}

.reflective-profile-close-btn {
  position: absolute;
  top: -42px;
  right: 0;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #ffffff;
  border-radius: 9999px;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 18px;
  transition: background 0.15s ease;
}

.reflective-profile-close-btn:hover {
  background: rgba(255, 255, 255, 0.25);
}

.reflective-avatar-trigger {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 4px;
  border-radius: 8px;
  background: transparent;
  border: none;
  cursor: pointer;
  text-align: left;
  transition: background 0.15s ease;
  width: 100%;
}

.reflective-avatar-trigger:hover {
  background: rgba(255, 255, 255, 0.05);
}

.reflective-avatar-trigger-badge {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--aksen, #3b82f6) 0%, #6366f1 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 15px;
  color: #ffffff;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
  flex-shrink: 0;
  position: relative;
}

.reflective-avatar-trigger-badge::after {
  content: '';
  position: absolute;
  bottom: 0;
  right: 0;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--lumut, #22c55e);
  border: 2px solid var(--latar, #121214);
}

