/* Sidebar identity card: ranks are loaded from the server-side user_ranks table. */
.profile.profile-card {
  margin: auto -4px 0;
  padding: 14px;
  border: 1px solid rgba(57, 86, 119, .8);
  border-radius: 13px;
  background: linear-gradient(145deg, rgba(18, 35, 55, .96), rgba(10, 18, 30, .98));
  box-shadow: 0 12px 28px rgba(0, 0, 0, .2);
}

.profile-card-head { display: flex; align-items: center; gap: 10px; }

.profile.profile-card .profile-avatar {
  display: grid;
  width: 37px;
  height: 37px;
  flex: 0 0 37px;
  place-items: center;
  margin: 0;
  border: 1px solid rgba(77, 227, 232, .45);
  border-radius: 11px;
  background: linear-gradient(135deg, #22486a, #1a2e55);
  color: var(--cyan);
  font: 800 15px 'JetBrains Mono', monospace;
}

.profile-identity { min-width: 0; }
.profile.profile-card .profile-identity strong {
  display: block;
  overflow: hidden;
  color: var(--text);
  font-size: 14px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.profile.profile-card .profile-session {
  display: flex;
  align-items: center;
  gap: 5px;
  margin: 1px 0 0;
  color: var(--muted);
  font-size: 10px;
}

.profile-session i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--success);
  box-shadow: 0 0 8px var(--success);
}

.profile-ranks {
  margin: 13px 0 11px;
  padding: 10px 0 0;
  border-top: 1px solid rgba(57, 86, 119, .58);
}

.profile.profile-card .profile-label {
  display: block;
  margin: 0 0 7px;
  color: #88a5c5;
  font: 700 9px 'JetBrains Mono', monospace;
  letter-spacing: 1px;
}

.profile-rank-list { display: grid; gap: 6px; }

.profile.profile-card .profile-rank {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-width: 0;
  margin: 0;
  padding: 6px 8px;
  border: 1px solid #29445f;
  border-radius: 7px;
  background: rgba(7, 14, 24, .58);
  color: #b9cce0;
  font-size: 11px;
  font-weight: 700;
}

.profile.profile-card .profile-rank > span {
  display: block;
  min-width: 0;
  margin: 0;
  overflow: hidden;
  color: inherit;
  font-size: inherit;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.profile.profile-card .profile-rank.is-primary {
  border-color: rgba(77, 227, 232, .52);
  background: rgba(33, 92, 111, .22);
  color: var(--cyan);
}

.profile-rank b {
  flex: 0 0 auto;
  color: #d5fbfd;
  font: 700 8px 'JetBrains Mono', monospace;
  letter-spacing: .3px;
  text-transform: uppercase;
}

.profile-card form { margin: 0; }
.profile.profile-card .profile-signout {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 0;
  color: #a6b7ca;
  font-size: 12px;
}

.profile.profile-card .profile-signout span {
  display: inline;
  margin: 0;
  color: var(--cyan);
  font-size: 14px;
  line-height: 1;
}

.profile.profile-card .profile-signout:hover { color: var(--text); }

@media (max-width: 630px) {
  .profile.profile-card { display: none; }
}
